3 Replies Latest reply on Nov 14, 2008 4:31 AM by khedive

    Multiple databases solution

    khedive Newbie

      Good day!
      We develop an accountant project, using JBoss 4.2.0, EJB 2.0
      All data, concerned to one company, located at one database.
      There is a task - to develop multi-company accountant, so each company must have its own database with all necessary tables, and within one project.
      Swithing between databases we have to do at run-time.

      How can we configure Jboss server to make possibility to connect multiple databases at run-time?

      //Additional information
      Database: Postgres 8.0
      postgres-ds.xml file contains one datasource.

      <local-tx-datasource>
      <jndi-name>PostgresDS</jndi-name>
      <connection-url>jdbc:postgresql://mysite.com:5803/proj</connection-url>
      ...


      Project's jbosscmp-jdbc.xml contains also only one link:

      java:/PostgresDS
      <datasource-mapping>PostgreSQL 7.2</datasource-mapping>
      <create-table>false</create-table>