1 Reply Latest reply on Oct 3, 2005 11:39 AM by Emmanuel Bernard

    Multiple databases with the same EJB's

    Alex Cooper Newbie

      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