Discussion:
[jboss-user] [JNDI and Naming] - Binding Dynamic Remote Object in Jboss 7.1.1
avi said
2012-12-21 07:41:17 UTC
Permalink
avi said [https://community.jboss.org/people/avis71] created the discussion

"Binding Dynamic Remote Object in Jboss 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/784402#784402

--------------------------------------------------------------
Hi,

I have been trynig to bind object to Jboss 7.1.1 JNDI using the following code:

public static void main(String[] args) {
  final Hashtable<String, Object> env = new Hashtable<String, Object>();
  env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
  env.put(Context.PROVIDER_URL, "remote://localhost:4447");
  env.put("jboss.naming.client.ejb.context", true);
  Context remoteContext = null;
  try {
   remoteContext = new InitialContext(env);
   remoteContext.bind("user:global/myName","user:Test");  
  } catch (NamingException e) {  
   e.printStackTrace();
  }
}


Getting the following error in the client JVM:
javax.naming.NamingException: Failed to bind [Root exception is java.io.IOException: Internal server error.]
at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:36)

In the server console I see:
JBAS011807: Unexpected internal error: java.lang.UnsupportedOperationException: JBAS011859: Naming context is read-only
at org.jboss.as.naming.WritableServiceBasedNamingStore.requireOwner(WritableServiceBasedNamingStore.java:126)
at org.jboss.as.naming.WritableServiceBasedNamingStore.bind(WritableServiceBasedNamingStore.java:56)
at org.jboss.as.naming.NamingContext.bind(NamingContext.java:221)

I have found several discussion on *JBAS011859* but the suggested solution is to run the code inside Jboss (as EJB) or as MSC Service.

The ability to bind object in JNDI from remote JVM was supported in Jboss 4, was this ability removed in Jboss 7? if yes, why?
Is there a workaround?

Regards
Avi
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/784402#784402]

Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]
avi saidian
2013-01-16 15:58:32 UTC
Permalink
avi saidian [https://community.jboss.org/people/avis71] created the discussion

"Re: Binding Dynamic Remote Object in Jboss 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/792386#792386

--------------------------------------------------------------
We are now in the middle of migration from jboss 4.2 to jboss 7.1.1, this is a real blocker.
I tried to use an EJB as mapping between names and Remote Objects, however this requires deep serialization of the remote object.

Any solution for this? someone?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/792386#792386]

Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]
Loading...