0 Replies Latest reply on Sep 12, 2007 11:53 AM by Heiko Dähn

    different datasources per ear-file with equal name

    Heiko Dähn Newbie


      since I use EJB3, I won't use a deployment descriptor.
      My datasource will injected with

      @Resource(mappedName="java:/jdbc/defaultDB" DataSource ds;

      So far so good. Now, I have to deploy two applications (app1 and app2) with equal components, but with different databases.

      here is my favorite configuration in jboss 4.2.1:


      ...\app1.ear -oracle-ds.xml (contains-datasource: jdbc/defaultDB for database A)
      ...\app2.ear -oracle-ds.xml (contains-datasource: jdbc/defaultDB for database B)

      I know, this is not allowed, because the name must be unique.
      But how can I manage this?