Location of NamingContextFactory
Issue
In the SOA quickstarts there are many examples of how to locate a resource via JNDI. A key component of the lookup is the jboss NamingFactory. Howerver when running some of the examples as stand alone java applications (and therefore a serverly cut down classpath), my applications are unable to location the aforementioned class.
Typical code is as follows:
Properties properties1 = new Properties();
properties1.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
properties1.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
properties1.put(Context.PROVIDER_URL, "jnp://127.0.0.1:1099");
InitialContext iniCtx = new InitialContext(properties1);
Object tmp = iniCtx.lookup("/ConnectionFactory");
QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
The exception is: [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
In which jar(s) can l locate the necessecary classes in order to do lookups via JNDI?
Environment
JBoss SOA-P 5.0.2
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.