<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Data Source Configuration in AS 7
</h3>
<span style="margin-bottom: 10px;">
    new comment by <a href="http://community.jboss.org/people/MrEasy">Rico Neubauer</a> <a href="http://community.jboss.org/docs/DOC-16657#comment-6572">View all comments on this document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Example for an Oracle XA-datasource:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>&lt;xa-datasource jndi-name="java:/MyDB" pool-name="MyDB" enabled="true" use-java-context="true"&gt;</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>&#160;&#160;&#160; &lt;xa-datasource-class&gt;oracle.jdbc.xa.client.OracleXADataSource&lt;/xa-datasource-class&gt;</em></p><p><em>&#160;&#160;&#160; &lt;xa-datasource-property name="URL"&gt;jdbc:oracle:thin:@server:1521:dbname&lt;/xa-datasource-property&gt;</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>&#160;&#160;&#160; &lt;!-- HA: Oracle Specific methods to deal with connection problems --&gt;</em></p><p><em>&#160;&#160;&#160; &lt;new-connection-sql&gt;call DBMS_APPLICATION_INFO.SET_MODULE('MyApp ${bisas.pid}','MyDB')&lt;/new-connection-sql&gt;</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>&#160;&#160;&#160; &lt;security&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;user-name&gt;MyUser&lt;/user-name&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;password&gt;MyPassword&lt;/password&gt;</em></p><p><em>&#160;&#160;&#160; &lt;/security&gt;</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>&#160;&#160;&#160; &lt;!-- pooling parameters --&gt;</em></p><p><em>&#160;&#160;&#160; &lt;xa-pool&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;min-pool-size&gt;5&lt;/min-pool-size&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;max-pool-size&gt;200&lt;/max-pool-size&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- uncomment to enable interleaving &lt;interleaving/&gt; --&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;is-same-rm-override&gt;false&lt;/is-same-rm-override&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa --&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;no-tx-separate-pools/&gt;</em></p><p><em>&#160;&#160;&#160; &lt;/xa-pool&gt;</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>&#160;&#160;&#160; &lt;!-- timeout and expiry parameters --&gt;</em></p><p><em>&#160;&#160;&#160; &lt;validation&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;validate-on-match&gt;false&lt;/validate-on-match&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;background-validation-minutes&gt;5&lt;/background-validation-minutes&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool --&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!--valid-connection-checker-class-name&gt;org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker&lt;/valid-connection-checker-class-name--&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- Checks the Oracle error codes and messages for fatal errors --&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;exception-sorter class-name="org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter"&gt;&lt;/exception-sorter&gt;</em></p><p><em>&#160;&#160;&#160; &lt;/validation&gt;</em></p><p><em>&#160;&#160;&#160; &lt;!-- TODO why is this not working? It should comply with the schema</em></p><p><em>&#160;&#160;&#160; &lt;time-out&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;blocking-timeout-millis&gt;60000&lt;/blocking-timeout-millis&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;idle-timeout-minutes&gt;15&lt;/idle-timeout-minutes&gt;</em></p><p><em>&#160;&#160;&#160; &lt;/time-out&gt;</em></p><p><em>&#160;&#160;&#160; --&gt;</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>&#160;&#160;&#160; &lt;statement&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;prepared-statement-cache-size&gt;20&lt;/prepared-statement-cache-size&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- Whether to monitor for unclosed Statements and ResultSets and issue warnings when the user forgets to close them (default nowarn).</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Use nowarn for production and true for testing --&gt;</em></p><p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;track-statements&gt;nowarn&lt;/track-statements&gt;</em></p><p><em>&#160;&#160;&#160; &lt;/statement&gt;</em></p><p><em>&lt;/xa-datasource&gt;</em></p></div>

</td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>