aspose file tools*
The moose likes Servlets and the fly likes Basic initialization question regarding JMS/MQ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Basic initialization question regarding JMS/MQ" Watch "Basic initialization question regarding JMS/MQ" New topic
Author

Basic initialization question regarding JMS/MQ

Jimmy Ho
Ranch Hand

Joined: Jul 31, 2007
Posts: 61
So I kind of know how to write code that uses JMS to connect to a WebSphere MQ queue. What I don't know how to do is deploy this code on an J2EE application server and actually get the code up and running. On a 'normal' JVM, I can just have the main() method call the JMS code, but I'm at a loss when it comes to application servers and EAR files.

Is it as simple as throwing in a servlet, and when the app server installs the EAR files and enclosed servlet, just call the JMS code in the servlet initialization methods to start listening to an MQ queue? Or is there some other best practice for this that I'm missing? For example, no servlet, just put blah blah blah entry in the web.xml and voila, it works?

I'm using Eclipse 3.2.2 with the IBM Web Tools Platform, and this will be deployed on WebSphere Application Server 5.1. I may not be able to do SOAP over JMS, which I know there's some tooling out there to auto-generate the code, but I want to see if can just hook up to the JMS without that. WAS 5.1 runs J2EE 1.3.

Any ideas?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61222
    
  66

Is a context listener perhaps what you are seeking?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Basic initialization question regarding JMS/MQ