6 Replies Latest reply on Sep 3, 2008 11:21 AM by Dieter Cailliau

    How to run a Queue and MDB into a cluster

    Damien Newbie

      Hi all,

      I need to migrate a queue and mdb into a cluster configuration.

      I've read mutliple wiki and docs and I need some help.
      I'm running all into a Jboss AS 4.05 Ga.

      Actualy, to create queue, it is done directly by Jboss , in reading annotation from my MDB. I haven't any xml files, all is done automaticly

      For example, this is my annotation into my java file of mdb :

      @MessageDriven(messageListenerInterface = MessageListener.class, activationConfig = {
       @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
       @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/Cmd2MuQueue"),
       @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge") })

      Now, from what I've read, I understand that I've got to declare a queue and mdb into xml file and to put it (with java class of MDB) into JBOSS_HOME/deploy-hasingleton/jms.

      I've made a conf file for queue, named myqueue-service.xml :
      <mbean code="org.jboss.mq.server.jmx.Queue"
       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
       <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
       <attribute name="SecurityConf">
       <role name="guest" read="true" write="true" create="true"/>
       <attribute name="ReceiversImpl">

      And I've made a jar file contains :
      + com
       + society
       + CmdMessageDrivenBean.class
      + META-inf
       + ejb-jar.xml
       + jboss.xml

      ejb-jar.xml :
       <description>Singleton MDB, MyMDB</description>

      and jboss.xml :
       <configuration-name>Singleton Message Driven Bean</configuration-name>

      First question : is it the right way ?
      Second question : how I handle the fact that my mdb need to access to EJB3 classes , and these classes aren't loaded yet, so I've got an class loading error, as my EJB3 ared loaded after queue actualy.. ??

      Thanks a lot for ur responses.