Meaningless Drivel is fun!*
The moose likes EJB and other Java EE Technologies and the fly likes Continually run MyMessageListener.java 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 MyMessageListener.java using JMS P2P in Cluster" Watch "Continually run MyMessageListener.java using JMS P2P in Cluster" New topic
Author

Continually run MyMessageListener.java 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 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?
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:
http://e-docs.bea.com/wls/docs81/jms/implement.html
Regards.


I think, therefore I exist -- Rene Descartes
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Continually run MyMessageListener.java 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 ?