How to do successful remote lookup from EJB deployed in EAP 6.x from EAP 4/5

Solution Verified - Updated -

Issue

  • We would like to lookup a remote EJB that is running on JBoss EAP 4.x. The client is a war that runs in JBoss EAP
    6.x.

  • The following below is the client code snippet that is being used,

jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
jndiProperties.put("jboss.naming.client.ejb.context", "true");
jndiProperties.put(Context.PROVIDER_URL, "remote://...:4447 or jnp://...:1099");
  • We get the following below errors in the logs:
"JBAS011843: Failed instantiate InitialContextFactory org.jboss.naming.remote.client.InitialContextFactory "
  • What values for Context.INITIAL_CONTEXT_FACTORY, Context.URL_PKG_PREFIXES and Context.PROVIDER_URL do we have to use?

  • What configuration need to be added to the JBoss or the application ?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 4.x
    • 5.x
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content