4 Replies Latest reply on Sep 28, 2005 9:32 AM by Shantanu Gera

    XAConnectionFactory not bound

    Vinicius Carvalho Newbie

      Hi there! I'm trying to deploy a simple MDB, but I'm getting this error.
      Here's my deployment descriptors:

      <ejb-jar>
      <display-name>MailCreatorEJB</display-name>
      <enterprise-beans>
      <message-driven>
      <display-name>MailCreator</display-name>
      <ejb-name>MailCreator</ejb-name>
      <ejb-class>mailcreator.MailCreatorBean</ejb-class>
      <transaction-type>Container</transaction-type>
      <message-driven-destination>
      <destination-type>javax.jms.Queue</destination-type>
      </message-driven-destination>
      <resource-ref>
      <res-ref-name>QCF</res-ref-name>
      <res-type>javax.jms.QueueConnectionFactory</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>
      <resource-env-ref>
      <resource-env-ref-name>jms/MailQueue</resource-env-ref-name>
      <resource-env-ref-type>org.jboss.mq.server.jmx.Queue</resource-env-ref-type>
      </resource-env-ref>
      </message-driven>
      </enterprise-beans>
      <assembly-descriptor>
      <container-transaction>

      <ejb-name>MailCreator</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor>
      </ejb-jar>



      <enterprise-beans>
      <message-driven>
      <ejb-name>MailCreator</ejb-name>
      <destination-jndi-name>jms/MailQueue</destination-jndi-name>
      <resource-ref>
      <res-ref-name>QCF</res-ref-name>
      <jndi-name>QueueConnectionFactory</jndi-name>
      </resource-ref>
      </message-driven>
      </enterprise-beans>


      also added this to the jbossmq-destinations-service.xml


      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager


      I still have the hsqld-ds configured and the drivers.

      Any ideas?

      Thanks

        • 1. Re: XAConnectionFactory not bound
          Oguz Kologlu Newbie

          You need to supply a little more information:
          jboss version
          platform
          jdk version?

          • 2. Re: XAConnectionFactory not bound
            Vinicius Carvalho Newbie

            Well, thanks. The deploy is ok now, but I'm not being able to find the QueueConnectionFactory through jndi lookup. I'll post my descriptors, plus the client code:

            jboss.xml :

            <message-driven>
             <ejb-name>MailCreatorMDB</ejb-name>
             <destination-jndi-name>queue/MailQueue</destination-jndi-name>
             <resource-ref>
             <res-ref-name>jms/QCF</res-ref-name>
             <jndi-name>QueueConnectionFactory</jndi-name>
             </resource-ref>
            </message-driven>
            


            ejb-jar.xml

            <enterprise-beans>
             <message-driven>
             <display-name>MailCreatorMDB</display-name>
             <ejb-name>MailCreatorMDB</ejb-name>
             <ejb-class>mailcreator.MailCreatorMDBBean</ejb-class>
             <transaction-type>Container</transaction-type>
             <message-driven-destination>
             <destination-type>javax.jms.Queue</destination-type>
             </message-driven-destination>
             <resource-ref>
             <res-ref-name>jms/QCF</res-ref-name>
             <res-type>javax.jms.QueueConnectionFactory</res-type>
             <res-auth>Container</res-auth>
             </resource-ref>
             <resource-env-ref>
             <resource-env-ref-name>queue/MailQueue</resource-env-ref-name>
             <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
             </resource-env-ref>
             </message-driven>
             </enterprise-beans>
            


            jbossmq-destinations-service.xml

             <mbean code="org.jboss.mq.server.jmx.Queue"
             name="jboss.mq.destination:service=Queue,name=MailQueue">
             <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
             </mbean>
            


            Cliente code (POJO class):
            try {
             this.ctx = new InitialContext(System.getProperties());
             QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup("jms/QCF");
             Queue queue = (Queue)ctx.lookup("java:/comp/env/jms/MailQueue");
             QueueConnection queueConnection = factory.createQueueConnection();
             QueueSession queueSession = queueConnection.createQueueSession(false,0);
             QueueSender sender = queueSession.createSender(queue);
             ObjectMessage objMsg = queueSession.createObjectMessage();
             objMsg.setObject(userDTO);
             sender.send(objMsg);
             queueConnection.close();
             }
            


            I'm running jboss 3.2.2 on a windows XP (development, production is a Debian) JVM 1.4.2


            Thanks

            Vinicius

            • 3. Re: XAConnectionFactory not bound
              Adrian Brock Master

              There is no such deployment "QueueConnectionFactory".
              There is a "ConnectionFactory" or "UIL2ConnectionFactory", etc.

              • 4. Re: XAConnectionFactory not bound
                Shantanu Gera Newbie

                Hi ,
                I am having the same problem not able to find UILConnection factory ,so were you able to find any solution for the problem .
                Thanks