Meaningless Drivel is fun!*
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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 agree. Here's the link:
subject: Continually run using JMS P2P in Cluster
Similar Threads
Synchronous processing - Challenge
Clustered JBoss Application Server nodes synchronization ?
'True' Singletons in Clustered EJB Servers
Questions Regarding Messaging
Singleton In EJB Clustered Servers ?