File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating single instance of MDB in glassfish cluster

 
Seema Hemant
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Could you please help me on the following:-

Multiple instances of the MDBs are getting created in parallel (1 on each instance) even though the max-pool-size is set to 1. Due to this, the messages from a queue are getting consumed in parallel - over the 2 instances of the server.How do i create a single instance of the MDB on glassfish cluster?
Note : We are using EJB3.0 and glassfish 2.1 which does not support @Singleton annotation.
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Posting on the glassfish forum may help better.

As far as I know you have this problem only with topics. An MDB that listens to a topic and deployed across a cluster would each receive one copy of the message. The container views each subscription from the MDB pool in each cluster as an independent one.

With queues, you shouldnt be having this problem since the message is delivered only to one consumer. So even if the MDBs deployed in the cluster are viewed by the container as independent listeners, only one should get the message. That's what a queue is about.

ram.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic