• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Continually run MyMessageListener.java using JMS P2P in Cluster

 
Sam Gehouse
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic