JBoss Community

Re: "Newbie Question" - Managed Connections

created by n2jaz in Performance Tuning - View the full discussion

<datasources>

    <local-tx-datasource>

        <jndi-name>jdbc/TaxDataSource</jndi-name>

        <connection-url>jdbc:oracle:thin:@localhost:1521:DBNAME</connection-url>

        <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>

        <user-name>xxxxx</user-name>

        <password>xxxxx</password>

        <min-pool-size>20</min-pool-size>

        <max-pool-size>50</max-pool-size>

        <!-- 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>

        <!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker is prefered

        <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>

        -->

        <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->

        <metadata>

            <type-mapping>Oracle9i</type-mapping>

        </metadata>

    </local-tx-datasource>

Reply to this message by going to Community

Start a new discussion in Performance Tuning at Community