JBoss Community

Re: JBoss 7 multiple data source declarations for multiple applications

created by Shadow Creeper in Datasource Configuration - View the full discussion

I'm not using xa-datasource, so your mileage may differ, but I provide that in the datasource definition via the <connection-url>jdbc:....</connection-url> node.

 

{code:xml}

<datasources>

 

   <datasource jndi-name="java:/jboss/datasources/MyDS"

               pool-name="MyDS"

               enabled="true"

               use-java-context="true">

      <connection-url>@database.url@</connection-url>

      <driver>@database.driver@</driver>

      <pool>

         <min-pool-size>100</min-pool-size>

         <max-pool-size>200</max-pool-size>

      </pool>

      <security>

         <user-name>@database.username@</user-name>

         <password>@database.password@</password>

      </security>

      <statement>

         <prepared-statement-cache-size>100</prepared-statement-cache-size>

         <share-prepared-statements>true</share-prepared-statements>

      </statement>

   </datasource>

 

</datasources>

{code}

 

The @database.*@ lines obviously need to be replaced with your database setup.

Reply to this message by going to Community

Start a new discussion in Datasource Configuration at Community