1 Reply Latest reply on Oct 5, 2002 1:42 AM by ardochoke

    multiple datasources in JBoss3.0.0

    marcwea

      Hello,

      I am sure it is possible, I just would like to use multiple datasources with jboss for different postgres databases. So far the application is working fine with one (still some deadlock issue though). So if someone can point me to somewhere (docs - link) that can explain me how, that would be great; the setup in jboss and also how to specify for a CMP2.0 Bean which datasource to use.
      Thank you very much.

      Marc

        • 1. Re: multiple datasources in JBoss3.0.0
          ardochoke

          If you copy your postgres-service.xml file (in deploy directory) to another name, such as postgres-otherds-service.xml. Then change all instances of 'PostgresDS' to your new datasource name then you will have two Postgres datasources pointing at different databases.

          In your jbosscmp-jdbc.xml file you have a & <datasource-mapping> in the defaults section. You need to add these (or just the datasource in your case as they are both postgres) to each item that doesn't point to the default. For example,


          <ejb-name>...</ejb-name>
          whatever you changed PostgresDS in the deploy dir too
          ...



          As for documentation, I bought the CMP documentation from the JBoss guys. I found it more than worth the money.

          cheers,
          Adrian