2 Replies Latest reply on Aug 28, 2008 12:50 PM by Tim Fox

    JBM w/ EJB 2 MDB issue (new to JBM)

    J P Newbie

      I was able to get the default queue producer\consumer set up and working fine with JMS 1.4 sp3. I'm having trouble replacing the default consumer with an EJB 2 MDB. Here is my xml destination set up:

       <mbean code="myEjbPackageNameHere.MessageConsumer"
       name="jboss.messaging.destination:service=Queue,name=testQueue"
       xmbean-dd="xmdesc/Queue-xmbean.xml">
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <depends>jboss.messaging:service=PostOffice</depends>
       </mbean>
      


      1. It seems that the serverpeer and postoffice components are required for this consumer to work within JMS, is that correct? My server won't deploy without them being referenced in this xml. No JBM EJB examples seem to mention this.

      2. For my consumer class, I've used the EJB 2 consumer example from the JMS manual, and extended DestinationServiceSupport in order to get the server peer\post office components. The server deploys, but when I kick out a message I get a reflection exception:

      Caused by: java.lang.IllegalArgumentException: Unable to find operation createQueue(java.lang.String,java.lang.String)

      I don't understand why this is happening, especially since createQueue isn't defined in my MDB class and I haven't changed anything else. Once I change the destination reference to the default queue example everything works again.

      I am new to all of this so I might be way off in my approach. Can anyone help?

        • 1. Re: JBM w/ EJB 2 MDB issue (new to JBM)
          J P Newbie

          Turns out that code block shouldn't even be entered anyway, the problem is that my queue is not being deployed on server startup whenever I replace

          mbean code="org.jboss.jms.server.destination.QueueService"
           name="jboss.messaging.destination:service=Queue,name=testQueue"
           xmbean-dd="xmdesc/Queue-xmbean.xml">


          with

          mbean code="pathToMyEJBConsumerClass"
           name="jboss.messaging.destination:service=Queue,name=testQueue"
           xmbean-dd="xmdesc/Queue-xmbean.xml">


          am I even using setting this up correctly? anyone?

          • 2. Re: JBM w/ EJB 2 MDB issue (new to JBM)
            Tim Fox Master

            There's a working EJB2 example in the distribution (see user guide).

            If that doesn't work it means your installation was bodged.