[jboss-user] [Datasource Configuration] - Re: JBoss 7 multiple data source declarations for multiple applications

Shadow Creeper do-not-reply at jboss.com
Wed May 30 15:23:06 EDT 2012


Shadow Creeper [https://community.jboss.org/people/shadowcreeper] created the discussion

"Re: JBoss 7 multiple data source declarations for multiple applications"

To view the discussion, visit: https://community.jboss.org/message/738868#738868

--------------------------------------------------------------
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
[https://community.jboss.org/message/738868#738868]

Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120530/30cbb471/attachment.html 


More information about the jboss-user mailing list