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.
The moose likes EJB and other Java EE Technologies and the fly likes Continually run using JMS P2P in Cluster Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Continually run using JMS P2P in Cluster" Watch "Continually run using JMS P2P in Cluster" New topic

Continually run using JMS P2P in Cluster

Sam Gehouse
Ranch Hand

Joined: Jul 21, 2003
Posts: 281
Can someone suggest a simple solution for continually running a P2P JMS class? 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 in a clustered environment?
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
Hi Sam,

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.

Please reconsider your design.
Fore more info you can read this doc:

I think, therefore I exist -- Rene Descartes
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Continually run using JMS P2P in Cluster
jQuery in Action, 3rd edition