Ok, so the problem is in your resource-ref When you deploy a seperate datasource, your resorce-ref needs to point to your new datasource, not DefaultDS.
Your configuration | <resource-ref> | <description>jdbc:mysql://127.0.0.2:3306/tmp</description> | <res-ref-name>jdbc/DefaultDS</res-ref-name> | <res-type>javax.sql.DataSource</res-type> | <res-auth>Container</res-auth> | <res-sharing-scope>Shareable</res-sharing-scope> | </resource-ref> | Should be rewritten as | <resource-ref> | <description>jdbc:mysql://127.0.0.2:3306/tmp</description> | | <res-ref-name>jdbc/SOME-NEW_NAME-FOR-MY-DS</res-ref-name> | <res-type>javax.sql.DataSource</res-type> | <res-auth>Container</res-auth> | <res-sharing-scope>Shareable</res-sharing-scope> | </resource-ref> | | | | | | The resource-ref name is simply a logical binding used in your code to avoid having to hardcode resource-JNDI names. | | | | Now you simply need a jboss.xml file to bind the resource-ref to the actual JNDI name in your *-ds.xml file: | | | | | | | <resource-ref> | | | <res-ref-name >jdbc/SOME-NEW_NAME-FOR-MY-DS</res-ref-name> | | | <resource-name>THE-ACTUAL-JNDI-NAME</resource-name> | | | </resource-ref> | | | | | | | The jboss.xml file should go in the META-INF directory of your EJB jar file. My suggestion would be to start with a fresh install of JBoss, make the changes and redeploy. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016533#4016533 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016533 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
