0 Replies Latest reply on Dec 22, 2005 4:24 AM by chaitanya

    how to connect multiple datasources in sessionbean

    chaitanya Novice

      how to connect multiple datasources lookup in sessionbean in JBoss;when i run jboss while deploying only i am getting EJB Spec violation is coming.

      ejb-jar.xml
      *************

      No Description
      <display-name>DeptSessionBean</display-name>
      <ejb-name>DeptSessionBean</ejb-name>
      com.blah.blah.blah.blah.DeptSessionBeanHome
      com.blah.blah.blah.blah.DeptSession
      <ejb-class>com.blah.blah.blah.blah.DeptSessionBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <resource-ref>
      No Description
      <res-ref-name>jdbc/DB</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>

      </resource-ref>


      No Description
      <display-name>DeptSessionBeanDuplicate</display-name>
      <ejb-name>DeptSessionBeanDuplicate</ejb-name>
      com.blah.blah.blah.blah.DeptSessionBeanHome
      com.blah.blah.blah.blah.DeptSession
      <ejb-class>com.blah.blah.blah.blah.DeptSessionBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <resource-ref>
      No Description
      <res-ref-name>jdbc/ReportDB</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>

      </resource-ref>


      jboss.xml
      ******************

      <ejb-name>DeptSessionBean</ejb-name>
      <jndi-name>DeptSessionBean</jndi-name>
      <res-ref-name>jdbc/DB</res-ref-name>
      <resource-name>oraclePool</resource-name>



      <ejb-name>DeptSessionBeanDuplicate</ejb-name>
      <jndi-name>DeptSessionBeanDuplicate</jndi-name>
      <res-ref-name>jdbc/ReportDB</res-ref-name>
      <resource-name>reportPool</resource-name>