4 Replies Latest reply on Nov 1, 2001 8:02 PM by test

    JBoss 2.2.2 - unable to bind MDB

    test Newbie

      Hi,

      I am using JBoss 2.2.2 with embedded Tomcat. I created an MDB and assiciated ejb-jar.xml and jboss.xml as suggested in documentation. Then I created queue in conf/tomcat/jbossmq.xml. When I run jboss_with_tomcat, it fails with msg javax.naming.NameNotFoundException: msgMDB not bound where msgMDB is my MDB ejb name.

      However I am able to create session/entity beans without any problem.

      Any clues will be appreciated.

        • 1. Re: JBoss 2.2.2 - unable to bind MDB
          Peter Antman Expert

          Did you really do the change in conf/tomcat/ and not in conf/default/?

          //Peter

          • 2. Re: JBoss 2.2.2 - unable to bind MDB
            test Newbie

            Yes, I actually changed jboss/conf/tomcat. Problem is with Queue type destinations. I was trying code similar to 'Message Driven Beans and JBoss' for Queue. Step 1 to 5 from sample is exactly what I did for Queue. Then I tried Topic sample and it works. Also I am able to create session/entity beans with no JNDI naming problem.

            I wonder how JBoss binds MDB to Queue ceated in JBossMQ.xml? I can see Queue in global JNDI namespace. MDB is available at right place just like other session/entity beans. But it still cannot bind.

            Do we need to do something different for transaction-type Bean rather than transaction-type container? Thats the only difference I can see in sample code for Queue and Topic.

            • 3. Re: JBoss 2.2.2 - unable to bind MDB
              Paul Austin Newbie

              Message driven beans are not directly bound to JNDI as session and entity beans are, instead you bind the MDB to a queue which is looked up via jndi using the destination-jndi-name tag in jboss.xml.


              <?xml version="1.0" ?>


              <enterprise-beans>
              <message-driven>
              <ejb-name>msgMDB</ejb-name>
              <configuration-name>Standard Message Driven Bean</configuration-name>
              <destination-jndi-name>queue/myQueue</destination-jndi-name>
              </message-driven>
              </enterprise-beans>

              • 4. Re: JBoss 2.2.2 - unable to bind MDB
                test Newbie

                I tried MDB to queue binding through jboss.xml destination-jndi-name tag. Just the way it's mentioned in documentation. It didn't work. But then I tried Topic as mentioned in sample. It worked without a problem.

                Only difference in between Queue and Topic sample is container versus bean transaction type.

                Are you able to successfully create Queue?