Is there any way of programmatically configuring the JDBC connection associated with a persistence unit? Specifically the username and password.
I would like to use EJB3 entities in a client application and the user login is the login to the database.
I thought about dynamically binding a Datasource into JNDI under the name in persistence-unit.xml but can't see a way of doing this.
Many thanks.
I haven't found a simple solution for this (though I still feel that one is out there).
I have fallen back to using Hibernate Annotations and will handle the connection/session and transactions myself. Shame - session beans would have been nice.