[jboss-user] [Datasource Configuration] - XADatasource and Oracle RAC - Load Balancing

Marco Sarti do-not-reply at jboss.com
Tue Nov 20 09:51:34 EST 2012


Marco Sarti [https://community.jboss.org/people/msarti66] created the discussion

"XADatasource and Oracle RAC - Load Balancing"

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

--------------------------------------------------------------
JBoss 4.2.3 GA - Oracle 11g RAC

We have configured a XADatasource pointing to an Oracle RAC. When we get the connection from this datasource we do not obtain any load balancing, in other words every time we ask for a connection we obtain a connection to the same RAC node. 
How can we configure the DS in order to have a load balancing on the RAC nodes?

Following the datasource configuration:

<jndi-name>jdbc/xxxxxxxx</jndi-name>
    <track-connection-by-tx/>
    <isSameRM-override-value>false</isSameRM-override-value>
    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
        <xa-datasource-property  name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(protocol=tcp)(host=rac-scan)(port=xxx))(LOAD_BALANCE=YES)(CONNECT_DATA=(SERVE
R=DEDICATED)(SERVICE_NAME=dbname.domain)))</xa-datasource-property>
    <xa-datasource-property name="User">XXXXXX</xa-datasource-property>
    <xa-datasource-property name="Password">YYYYYY</xa-datasource-property>
    <min-pool-size>0</min-pool-size>
    <max-pool-size>60</max-pool-size>
    <idle-timeout-minutes>2</idle-timeout-minutes>
    <blocking-timeout-millis>30000</blocking-timeout-millis>
        <!--sql to call when connection is created-->
        <new-connection-sql>select 1 from dual</new-connection-sql>
        <!--sql to call on an existing pooled connection when it is obtained from pool-->
        <check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
    <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
    <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
    <!-- Checks the Oracle error codes and messages for fatal errors -->
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
    <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
    <no-tx-separate-pools/>
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/777458#777458]

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/20121120/9fb879e6/attachment-0001.html 


More information about the jboss-user mailing list