Hi there,
I have a system which has multiple instances of the same database, all of which are managed from the same application. We'd like to migrate from plain JDBC to using EJB3 as a persistence layer.
What's the best way to have multiple instances of a PAR archive, which point to different databases? Of course, persistence.xml can just point to a different database, but I assume I'll need different JNDI names for the beans themselves?
Can I get away with just saying the JNDI name of the bean in a deployment descriptor, and using the annontations for everything else? Or will I need to use a full EJB 2.0-style deployment descriptor?
Many thanks in advance,
- sasha
Just change the persistence unit name in the persistence.xml and it's done. The EJB entities are defined only in the scope of a persistence unit ie a par