1 Reply Latest reply on Apr 9, 2008 9:27 AM by nishank

    No resource manager found for jms/TCF

    nishank

      Hi ,

      I am porting an application from Weblogic to Jboss4.x.
      While configuring JMS with Entity beans I am getting this message on the Jboss Console:
      No resource manager found for jms/TCF
      Because of this Jboss is unable to look up for JNDi name and hence giving naming.context.namenotfound exception while running the application.
      I am pasting my ejb-jar.xml and jboss.xml for reference.

      ejb-jar.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
      <ejb-jar id="EJBJar_1119650856615">
      <display-name>BusinessDataManagement</display-name>
      <enterprise-beans>

      Business Data Management Service
      <ejb-name>BusinessDataManagementService</ejb-name>
      com.eidea.stub.ejb.component.BusinessDataManagementServiceHome
      com.eidea.stub.ejb.component.BusinessDataManagementService
      <ejb-class>com.eidea.svc.ejb.data.DataManagementServiceBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <ejb-local-ref id="DataServiceLocalRefID">
      Reference to the RelationshipServiceLocal Home
      <ejb-ref-name>RelationshipServiceLocal</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>com.eidea.stub.ejb.relationship.RelationshipServiceLocalHome</local-home>
      com.eidea.stub.ejb.relationship.RelationshipServiceLocal
      <ejb-link>RelationshipService</ejb-link>
      </ejb-local-ref>
      <security-role-ref>

      <role-name>PiiEOperator</role-name>
      <role-link>PiiEOperator</role-link>
      </security-role-ref>
      <security-identity>
      <use-caller-identity/>
      </security-identity>
      <resource-ref id="res_ref_1">
      <res-ref-name>jms/TCF</res-ref-name>
      <res-type>javax.jms.TopicConnectionFactory</res-type>
      <res-auth>Container</res-auth>
      <res-sharing-scope>Shareable</res-sharing-scope>
      </resource-ref>
      <resource-env-ref id="res_env_ref_1">
      <resource-env-ref-name>jms/ptopic</resource-env-ref-name>
      <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>
      </resource-env-ref>

      </enterprise-beans>
      <assembly-descriptor>
      <security-role>
      Oms User
      <role-name>PiiEOperator</role-name>
      </security-role>
      <method-permission>
      <role-name>PiiEOperator</role-name>

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

      </method-permission>
      <container-transaction>

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

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

      Jboss.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <enterprise-beans>
      <ejb-name>BusinessDataManagementService</ejb-name>
      <resource-ref>
      <res-ref-name>jdo</res-ref-name>
      <jndi-name>jdo</jndi-name>
      </resource-ref>
      <resource-ref>
      <res-ref-name>jms/TCF</res-ref-name>
      <jndi-name>TopicConnectionFactory</jndi-name>
      </resource-ref>
      <resource-ref>
      <res-env-ref-name>jms/ptopic</res-env-ref-name>
      <jndi-name>topic/DefaultChannel</jndi-name>
      </resource-ref>
      <jndi-name>BusinessDataManagementService</jndi-name>
      </enterprise-beans>
      <security-role-assignment>
      <role-name>PiiEOperator</role-name>
      <principal-name>Deployers</principal-name>
      </security-role-assignment>


      Any help in this regard will be highly appreciated.

        • 1. Re: No resource manager found for jms/TCF
          nishank

          Hi all,

          After lot of hair pulling I've finally found out the workaround of the problem.
          I am not sure whether its a Jboss bug or our application bug.
          I will give the steps what i have done to resolve this No resource manger found issue.
          This is part of ejb-jar.xml which was giving the problem

          <resource-ref id="res_ref_1">
          <res-ref-name>jms/TCF</res-ref-name>
          <res-type>javax.jms.TopicConnectionFactory</res-type>
          <res-auth>Container</res-auth>
          <res-sharing-scope>Shareable</res-sharing-scope>
          </resource-ref>

          The corresponding Jboss.xml looks like this:
          <resource-ref>
          <res-ref-name>jms/TCF</res-ref-name>
          <resource-name>jms/TCF</resource-name>
          </resource-ref>
          <resource-managers>

          <resource-manager res-class="javax.jms.TopicConnectionFactory">
          <res-name>jms/TCF</res-name>
          <res-jndi-name>TopicConnectionFactory</res-jndi-name>
          </resource-manager>
          </resource-managers>

          Generally <resource-name> tag in Jboss.xml provides an indirection to the resource manager. The resource-name and res-name tags should be equal.. In my case both are jms/TCF. This is as per to the documentation of Jboss. But, I dont know this is not working. Rather if I make res-ref-name and res-name tag as equal(jms/TCF) and remove the resource-name tag from Jboss.xml then it starts working fine.
          This is a workaround and still I am not sure whether it will work for others or not but for me it is working fine.
          If somebody gets a much better solution then please do intimate me.
          Any suggestions will be highly appreciated.