Went to Nabble to see the original thread. For some reason the email didn't show up for moderation.
> Despite skepticism about Java EE, I would like to try Tomee. However, once > again a simple DataSource definition for JPA drives me crazy. > > I have a datasource defined in tomee.xml - eg <Resource Id="bookDs" > type="DataSource">. . . . <Resource> > This data source is used in a JPA persistence unit (<jta-data-source>bookDs</ > jta-data-source>. > > However, when tomee starts the output log says "INFO: Adjusting > PersistenceUnit bookDs <jta-data-source> Resource id to 'My DataSource' ...." > Then, it seems JPA EntityManager works with a default data source (hsqldb). > > Can anybody of you can explain whats wrong??? That should definitely work and is one of the many ways we test: http://svn.apache.org/repos/asf/openejb/tags/openejb-4.0.0/container/openejb-core/src/test/java/org/apache/openejb/config/AutoConfigPersistenceUnitsTest.java The INFO message you posted should have a part on the end that says what it found INFO - Adjusting PersistenceUnit orange-unit <jta-data-source> to Resource ID 'Default JDBC Database' from 'null' INFO - Adjusting PersistenceUnit orange-unit <non-jta-data-source> to Resource ID 'Default Unmanaged JDBC Database' from 'null' Can you post the entire log line including the "from" part on the end? All that aside, I'd recommend deleting the "My DataSource" and all other declarations you're not using from the tomee.xml file. Also, make sure you restart the server after editing the tomee.xml. -David
