9 Replies Latest reply on Aug 26, 2013 4:00 PM by soft

    JBoss 5.1.0: clustered JMS queue

    valerio de minico Newbie

      Hi all,

      I have this scenario: two nodes and on both is deployed the same ear contaning a MDB; these MDBs receive messages from a clustered queue. A JMS client, active on the first node, write messages on the clustered queue.


      The queue is defined as follow (and deployed on both nodes):


         <mbean code="org.jboss.jms.server.destination.QueueService"
            <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
            <attribute name="Clustered">true</attribute>


      MDB is annotated as follow:



                          activationConfig = { 
                                              @ActivationConfigProperty(propertyName = "destinationType",propertyValue = "javax.jms.Queue"),
                                              @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/TimsocialSlowUpdateProfileQueue")
      public class AsynchronousSlowAggregatorServiceBean implements MessageListener {


      JMS client writes messages getting a ConnectionFactory, where ConnectionFactory is the built-in connection factory (no-clusted):


      factory = (ConnectionFactory) ctx.lookup("ConnectionFactory");


      Problem is that messages are received only from the first MDB, which resides where the JMS client is deployed. It seems that queue is not clustered....


      Should I use ClusteredConnectionFactory??? I have read ClusteredConnectionFactory is used only for remote JMS client, so this is not the case.


      Any idea?