• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Creating single instance of MDB in glassfish cluster

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 489
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
LOOK! OVER THERE! (yoink) your tiny ad is now my tiny ad.
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic