NameNotFoundException when looking up JmsXA in JBoss EAP
Issue
The JmsXA connection factory is clearly available based on the JNDI information available in the JMX Console. However, a NameNotFoundException is thrown when this code is executed in a local MBean:
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
p.put(Context.PROVIDER_URL, "localhost:1099");
Context context = new InitialContext(p);
ConnectionFactory factory = (ConnectionFactory) context.lookup("java:/JmsXA");
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 4.3
- 5
- 6
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.
