1 Reply Latest reply on Dec 8, 2003 7:30 AM by Juha Lindfors

    Override default Datasource in Entity EJB

    afranken Newbie

      I have set up a default oracle datasource. I have an ejb I want to deploy but I want it to override the oracle datasource and connect to MS SQLSERVER.

      I cannot get it to look at MS SQLSERVER. When EJB is deployed, a table in created in oracle.
      Any help is greatly appreciated.

      In my META-INF/jboss.xml


      <enterprise-beans>

      <ejb-name>AcctAccessMatrix</ejb-name>
      <jndi-name>AcctAccessMatrix</jndi-name>
      <resource-ref>
      <res-ref-name>jdbc/msSQL7EJBPool</res-ref-name>
      <jndi-name>java:/msSQL7EJBPool</jndi-name>
      </resource-ref>

      </enterprise-beans>


      In my ejb-jar.xml

      <enterprise-beans>


      <ejb-name>AcctAccessMatrix</ejb-name>
      ......
      ......
      <resource-ref>
      <res-ref-name>jdbc/msSQL7EJBPool</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      </enterprise-beans>