Sunday, April 22, 2007

NetBeans and EJB 3.0 persistence.xml generation

For everyone using Netbeans, I found an issue in generating the persistence.xml for an EJB using EJB3.0, JBoss, and MySQL. The jta-data source in the config file was generated as follows...

<jta-data-source>mysql</jta-data-source>

After making the following update, the datasource was bound correctly from the EJB and all worked fine...

<jta-data-source>java:/mysql</jta-data-source>