I need a way to dynamically specify the persistence unit in a EJB.
Simplified example:
I have an application using multiple databases as data stores. Each of th
You can use the same persistence unit for this. You just need to provide a properties Map when you call createEntityManagerFactory() with the url/datasource you want to use.