I need to configure the JMS in JBoss 5. I'm looking for the jars to do so. Does anyone knows what Jars are needed to compile this lines of code?
h.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
h.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
h.put("java.naming.provider.url", "localhost:1099");
InitialContext i = new InitialContext(h);
I'm looking for the packages needed to compile. Always throws and ClassNotFoundException NamingContextFactory not found.
In JBoss 4 the jars are concurrent.jar, jbossmq-client.jar, jboss-common-client.jar, jboss-system-client.jar, jnp-client.jar and log4j.jar.
what are the JBoss 5 jars?
If you use Eclipse for Java EE as IDE, then all you need to do is just create JBoss Server Runtime, and in build path of your project add Server Runtime library, and all jars from JBoss AS will be added to your classpath, no need to look for them, everything will be compiled.
Here you can see what is used by JBoss AS 5.x to service JMS (look for "Remove JMS (Java Message Service)" on that page), some of jars are located there, some of jars are in common/lib folder of server (jboss-messaging.jar, jboss-messaging-int.jar, jnpserver.jar), some are located in lib folder (concurent.jar, jboss-common-core.jar, and jboss-system.jar). But better to use approach with IDE, does not help? Also be careful.
JBoss Messaging is a high performance JMS provider in the JBoss Enterprise Middleware Stack (JEMS), included with JBoss 5 as the default messaging provider. It is also the backbone of the JBoss ESB infrastructure. JBoss Messaging is a complete rewrite of JBossMQ, which is the default JMS provider for the JBoss AS 4.x series
UPDATE: to use Server Runtime library, maybe you will need to install JBoss Tools, I just don't remember if Eclipse can load all jars from JBoss without it.