How to bind a value to JNDI and remotely lookup it up in JBoss EAP 6
Issue
- We came to know that JNDI remote calls are not supported in EAP 6 - https://issues.jboss.org/browse/AS7-1338
- We have code in our application looks like following. Please advise how above kind of remote-JNDI-calls will be working in EAP6?
Server: Binding an a value using JNDI APIs
ctx = new InitialContext(contextProps);
ctx.bind("/ExampleKey", "ExampleValue")
Client: Remote JNDI call(from other JVMs) to retrieving the object----
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
properties.put("jnp.socket.Factory", "org.jnp.interfaces.TimedSocketFactory");
properties.setProperty("java.naming.provider.url", "jnp://"+ host +":1099");
String value = (String) InitialContext(properties).lookup("ExampleValue");
- Is it possible to call EJBs from separate applications that's backward compatible with JBoss EAP 5.1?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.0.x
- 6.1.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
