1 Reply Latest reply on Jul 12, 2005 6:07 AM by Jon Åkerström

    How to deploy same EJBs to several DBs?

    Luiz-Otavio Zorzella Newbie

      I have an application that is packaged as an EAR file, with a war and an ejb jar (I'm studying the idea of EJB3, with par, but I'm not there, yet).

      I want to be able to deploy the same EJBs against multiple databases, such that my application can choose which database to use. I'd also like to make this as "run-time" as possible.

      Since the DataSource is an attribute of the ejb-jar (same for par, AFAICT), how can I do that? Do I need to split the ear into war and ejb-jar, and then generate multiple ejb-jars with different data sources? That's kinda lame... Any better ideas?