views:

43

answers:

3

Hello,

I got a question about usage of JMS(Java Message Queue). Somewhere in documentation I have seen that everything I need to use JMS is jms.jar on the machine where the client is going to run. But I still not sure if I need glassfish or JBoss also installed on machine.. Anyone can me tell if it's really only jms.jar is needed or I need something more installed on machine?

Thanks, Serhiy.

+1  A: 

You need jms.jar to access JMS topics and queues. But in order to have a working JMS setup you need a JMS provider. Applications servers have JMS providers bundled. There are stand-alone JMS providers, like Apache ActiveMQ or HornetQ:

  • you need the jms provider jar(s) on your classpath, so that its concrete classes get instantiated (The JMS API only defines the contract)
  • you need the jms provider running and handling incoming and outgoing messages.
Bozho
Thanks a lot, I think I'll opt for ActiveMQ, since the environment is very restricted..
Serhiy
A: 

Well, actually JMS is just an standard API for messaging. You'll have to use an existing implementation as well as a provider in order to use it.

If you're using JBOSS take a look at HornetQ

StudiousJoseph
Thanks for the response, it's also correct =)
Serhiy
A: 

There's a tutorial on developerWorks which you may be interested in that describes how to run a JMS program outside of a JEE environment using WebSphere MQ.

The question of whether you need something other than the JMS jar file is another matter. The best answer is to always use the install media supplied by the vendor. I don't know about JBoss but with IBM's implementation that install media includes diagnostic utilities and if you just grab the jar files it may not be supported. Other vendors may also have support issues if you just grab the jar files but I don't have specifics.

T.Rob
I'm giving a look!
Serhiy