Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Basic initialization question regarding JMS/MQ

 
Jimmy Ho
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65115
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is a context listener perhaps what you are seeking?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic