This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Can someone suggest a simple solution for continually running a P2P MyMessageReceiver.java JMS class? MyMessageReceiver.java will receive messages as they are put in the queue by using receive() method.
I am NOT using MDB.
The MessageListener will be deployed in clustered environment. Can someone think of a simple thread/solution to run MyMessageReceiver.java in a clustered environment?
For building asynchronous jms consumers you could use either server session pools or MDB. However there is no reason to use server session pools and this was a technique employed before ejb 2.0 and MDBs. As a matter of fact here there is what bea recommends:
Note: Session pools are now used rarely, as they are not a required part of the J2EE specification, do not support JTA user transactions, and are largely superseded by message-driven beans (MDBs), which are simpler, easier to manage, and more capable.