3 Replies Latest reply on Oct 21, 2013 1:15 AM by prashamsjain

    missing dependenices with JMS when deploying ejb.2.x

    Arun Varadharajan Newbie

      I have a EJB.2.x with the resource reference for JMS connection factory as follows in jboss.xml

       

      <session>
               <ejb-name>NEContainer</ejb-name>
               <jndi-name>java:app/ejb-ems/NEContainer!com.abc.gem.ems.ne.interfaces.NEContainer</jndi-name>
               <local-jndi-name>java:app/ejb-ems/NEContainer!com.abc.gem.ems.ne.interfaces.NEContainerLocal</local-jndi-name>
               <configuration-name>GEM EMS Stateless SessionBean</configuration-name>
               <resource-ref>
                  <res-ref-name>jms/connectionFactory</res-ref-name>
                  <resource-name>TransactedJMSConnectionFactoryRef</resource-name>
               </resource-ref>
               <resource-ref>
                  <res-ref-name>jms/destination</res-ref-name>
                  <resource-name>GEMTMFEventTopicRef</resource-name>
               </resource-ref>
              <method-attributes>
              </method-attributes>
         </session>
      <resource-managers>
            <resource-manager>
               <res-name>TransactedJMSConnectionFactoryRef</res-name>
               <res-jndi-name>java:/JmsXA</res-jndi-name>
            </resource-manager>
            <resource-manager>
               <res-name>GEMTMFEventTopicRef</res-name>
               <res-jndi-name>java:/topic/GEMTMFEventTopic</res-jndi-name>
            </resource-manager>
      </resource-managers>
      
      

      and by ejb-jar.xml is

       

      <session >
               <description><![CDATA[bla bla for NEContainerEJB]]></description>
               <display-name>NEContainer</display-name>
               <ejb-name>NEContainer</ejb-name>
               <home>com.abc.gem.ems.ne.interfaces.NEContainerHome</home>
               <remote>com.abc.gem.ems.ne.interfaces.NEContainer</remote>
               <local-home>com.abc.gem.ems.ne.interfaces.NEContainerLocalHome</local-home>
               <local>com.abc.gem.ems.ne.interfaces.NEContainerLocal</local>
               <ejb-class>com.abc.gem.ems.ne.ejb.NEContainerSession</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Container</transaction-type>
               <env-entry>
                  <description><![CDATA[The number of event to process at one time.]]></description>
                  <env-entry-name>eventBatchSize</env-entry-name>
                  <env-entry-type>java.lang.Integer</env-entry-type>
                  <env-entry-value><![CDATA[10]]></env-entry-value>
               </env-entry>
               <ejb-local-ref >
                  <ejb-ref-name>ejb/AlmapServerGEMGUIPublisherLocal</ejb-ref-name>
                  <ejb-ref-type>Session</ejb-ref-type>
                  <local-home>com.abc.gem.event.ps.interfaces.AlmapServerGEMGUIPublisherLocalHome</local-home>
                  <local>com.abc.gem.event.ps.interfaces.AlmapServerGEMGUIPublisherLocal</local>
                  <ejb-link>ejb-jar-event-ps.jar#AlmapServerGEMGUIPublisher</ejb-link>
               </ejb-local-ref>
               <ejb-local-ref >
                  <ejb-ref-name>ejb/NELocal</ejb-ref-name>
                  <ejb-ref-type>Entity</ejb-ref-type>
                  <local-home>com.abc.gem.ems.ne.interfaces.NELocalHome</local-home>
                  <local>com.abc.gem.ems.ne.interfaces.NELocal</local>
                  <ejb-link>NE</ejb-link>
               </ejb-local-ref>
               <resource-ref >
                  <res-ref-name>tl1pc</res-ref-name>
                  <res-type>javax.resource.cci.ConnectionFactory</res-type>
                  <res-auth>Container</res-auth>
                  <res-sharing-scope>Shareable</res-sharing-scope>
               </resource-ref>
               <resource-ref >
                  <res-ref-name>exsnmp</res-ref-name>
                  <res-type>com.abc.gem.exsnmp.ExSnmpCxFactory</res-type>
                  <res-auth>Container</res-auth>
                  <res-sharing-scope>Shareable</res-sharing-scope>
               </resource-ref>
               <resource-ref >
                  <res-ref-name>snmppc</res-ref-name>
                  <res-type>javax.resource.cci.ConnectionFactory</res-type>
                  <res-auth>Container</res-auth>
                  <res-sharing-scope>Shareable</res-sharing-scope>
               </resource-ref>
               <resource-ref >
                  <res-ref-name>jms/connectionFactory</res-ref-name>
                  <res-type>javax.jms.ConnectionFactory</res-type>
                  <res-auth>Container</res-auth>
                  <res-sharing-scope>Shareable</res-sharing-scope>
               </resource-ref>
               <resource-ref >
                  <res-ref-name>env/jms/destination</res-ref-name>
                  <res-type>javax.jms.Destination</res-type>
                  <res-auth>Container</res-auth>
                  <res-sharing-scope>Shareable</res-sharing-scope>
               </resource-ref>
      </session>
      
      

      When i try it deploy this EJB, I'm getting missing dependency as

       

      service jboss.naming.context.java.jboss.resources.env.jms.destination (missing) dependents: [service jboss.naming.context.java.comp.gem.ejb-ems.NEContainer.env.jms.destination]
      service jboss.naming.context.java.jboss.resources.jms.connectionFactory (missing) dependents: [service jboss.naming.context.java.comp.gem.ejb-ems.NEContainer.env.jms.connectionFactory]
      
      

      I genrate my EJB using XDOCLET and I reference these resouce as

       

      * @ejb.resource-ref
      *     res-ref-name="jms/connectionFactory"
      *     res-type="javax.jms.ConnectionFactory"
      *     res-sharing-scope="Shareable"
      *     res-auth="Container"
      *
      * @jboss:resource-ref
      *     res-ref-name="jms/connectionFactory"
      *     resource-name="TransactedJMSConnectionFactoryRef"
      *
      * @jboss:resource-manager
      *     res-man-name="TransactedJMSConnectionFactoryRef"
      *     res-man-jndi-name="java:/JmsXA"
      *
      * @ejb.resource-ref
      *     res-ref-name="jms/destination"
      *     res-type="javax.jms.Destination"
      *     res-sharing-scope="Shareable"
      *     res-auth="Container"
      *
      * @jboss:resource-ref
      *     res-ref-name="jms/destination"
      *     resource-name="GEMTMFEventTopicRef"
      *
      * @jboss:resource-manager
      *     res-man-name="GEMTMFEventTopicRef"
      *     res-man-jndi-name="topic/GEMTMFEventTopic"
      
      

       

      From the migration guide I see jboss.xml is replaced by jboss-ejb3.xml.

      But my jboss.xml is generated using xdoclet tool. Is there any easy way to tell xdoclet to use jboss-ejb3.xml instead of jboss.xml.

       

      any help would be appreciated.It is very urgent...