4 Replies Latest reply on Oct 13, 2012 8:02 AM by Dasari Prasad

    deploying mdb2.1 in jboss7.1.1

    Dasari Prasad Newbie

      how to deploy an mdb2.1 in jboss7.1.1

       

      i have

      <?xml version="1.0" ?>

      <ejb-jar  xmlns="http://java.sun.com/xml/ns/j2ee"

              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee

       

      http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1">

       

         <enterprise-beans>

           <message-driven>

            <ejb-name>MYLOG</ejb-name>

            <ejb-class>examples.LogBean</ejb-class>

            <transaction-type>Container</transaction-type>

             <message-destination-type>javax.jms.Topic</message-destination-type>

       

            <resource-ref>

              <res-ref-name>tpFactory</res-ref-name>

              <res-type>javax.jms.ConnectionFactory</res-type>

              <res-auth>Container</res-auth>

            </resource-ref>        

           </message-driven>

          </enterprise-beans>

      </ejb-jar>

       

      jboss-ejb3.xml

       

      <?xml version="1.0"?>

      <jboss:ejb-jar  xmlns:jboss="http://www.jboss.com/xml/ns/javaee"

                      xmlns="http://java.sun.com/xml/ns/javaee"

                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                      xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee

       

      http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd

                           http://java.sun.com/xml/ns/javaee

       

      http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"

                      version="3.1"

                      impl-version="2.1">

            <enterprise-beans>    

                 <message-driven>

                      <ejb-name>MyLOG</ejb-name>

             

                   <message-destination-ref>

             <message-destination-ref-name>jms/topic/test</message-destination-ref-

       

      name>

                   </message-destination-ref>

                  <resource-ref>

                    <res-ref-name>tpFactory</res-ref-name>

                    <jndi-name>RemoteConnectionFactory</jndi-name>

                  </resource-ref>

                 </message-driven>

            </enterprise-beans>

      </jboss:ejb-jar>

       

      when deployed it is telling

      java.lang.IllegalArgumentException: JBAS011084-componentClassName is null

       

      is there any location where details are given

        • 1. Re: deploying mdb2.1 in jboss7.1.1
          jaikiran pai Master

          Notice the mismatch in the ejb-name element values of your jboss-ejb3.xml and ejb-jar.xml? The names are case sensitive.

          1 of 1 people found this helpful
          • 2. Re: deploying mdb2.1 in jboss7.1.1
            Dasari Prasad Newbie

            Thanks for the correct correction

             

            but how to give jndi names for resource & deatination

             

            i corrected gave

             

            <?xml version="1.0"?>

            <jboss:ejb-jar  xmlns:jboss="http://www.jboss.com/xml/ns/javaee"

                            xmlns="http://java.sun.com/xml/ns/javaee"

                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                            xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd

                                 http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"

                            version="3.1"

                            impl-version="2.1">

                  <enterprise-beans>    

                       <message-driven>

                            <ejb-name>MYLOG</ejb-name>               

                         <message-destination-ref>

               <message-destination-ref-name>java:/topic/test</message-destination-ref-name>

                         </message-destination-ref>

                        <resource-ref>

                          <res-ref-name>tpFactory</res-ref-name>

                          <jndi-name>java:/ConnectionFactory</jndi-name>

                        </resource-ref>

                       </message-driven>

                  </enterprise-beans>

            </jboss:ejb-jar>

             

            but it is telling unsatisfactory dependencies

             

            WARN  [org.jboss.as.ee] (MSC service thread 1-1) JBAS011001: Could not resolve message-destination-ref java:/topic/test

             

            New missing/unsatisfied dependencies:

                  service jboss.naming.context.java.RemoteConnectionFactory (missing) dependents: [service jboss.naming.context.java.comp.mdb20.mdb20.MYLOG.env.tpFactory]

             

            i had used java:/ConnectionFactory ,java:/JmsXA also

            • 3. Re: deploying mdb2.1 in jboss7.1.1
              Sebastiao Santos Newbie

              Put the destination into the ejb-jar.xml, in the config property "destination":

               

                    <message-driven id="MessageDriven_2">

                       <description><![CDATA[Message Driven for ExecutaRotina]]></description>

                      ...

                       <messaging-type>javax.jms.MessageListener</messaging-type>

                       <transaction-type>Container</transaction-type>

                       <message-destination-type>javax.jms.Queue</message-destination-type>

                       <activation-config>

                         <activation-config-property>

                           <activation-config-property-name>destinationType</activation-config-property-name>

                           <activation-config-property-value>javax.jms.Queue</activation-config-property-value>

                         </activation-config-property>

                         <activation-config-property>

                           <activation-config-property-name>acknowledgeMode</activation-config-property-name>

                           <activation-config-property-value>Auto-acknowledge</activation-config-property-value>

                         </activation-config-property>

                         <activation-config-property>

                           <activation-config-property-name>destination</activation-config-property-name>

                           <activation-config-property-value><![CDATA[queue/CaleBatchQueue]]></activation-config-property-value>

                         </activation-config-property>        

                       </activation-config>

                       <resource-ref id="ResRef_60">

                          <description><![CDATA[QueueConnectionFactory Reference]]></description>

                          <res-ref-name>jms/QueueConnectionFactory</res-ref-name>

                          <res-type>javax.jms.QueueConnectionFactory</res-type>

                          <res-auth>Container</res-auth>

                          <res-sharing-scope>Shareable</res-sharing-scope>

                       </resource-ref>

                       ...

              Resource JNDI names goes in the jboss-ejb3.xml:

               

                    <message-driven>

                       <ejb-name>ExecutaRotinaBusinessMD</ejb-name>                      

                       <resource-ref>

                          <res-ref-name>jms/QueueConnectionFactory</res-ref-name>

                          <jndi-name>java:/ConnectionFactory</jndi-name>

                       </resource-ref>

                    </message-driven>

              • 4. Re: deploying mdb2.1 in jboss7.1.1
                Dasari Prasad Newbie

                i changed jboss-ejb3.xml as

                <?xml version="1.0"?>

                <jboss:ejb-jar  xmlns:jboss="http://www.jboss.com/xml/ns/javaee"

                                xmlns="http://java.sun.com/xml/ns/javaee"

                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                                xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd

                                     http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"

                                version="3.1"

                                impl-version="2.1">

                <enterprise-beans>    

                  <message-driven>

                   <ejb-name>MYLOG</ejb-name>

                   <ejb-class>examples.LogBean</ejb-class>

                   <activation-config>

                     <activation-config-property>

                      <activation-config-property-name>destination

                      </activation-config-property-name>

                      <activation-config-property-value>java:/topic/test</activation-config-property-value>

                     </activation-config-property>

                     </activation-config>

                     <resource-ref>

                       <res-ref-name>tpFactory</res-ref-name>

                       <jndi-name>java:/RemoteConnectionFactory</jndi-name>

                     </resource-ref>

                    </message-driven>

                  </enterprise-beans>

                </jboss:ejb-jar>

                 

                then it is running satisfactorily