Hi, i have an spring web application (on glassfish server) that use JDBC connection pool. It defined in XML file like this:
<resources>
<jdbc-connection-pool allow-non-component-callers="true" associate-with-thread="true"
connection-creation-retry-attempts="2" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false"
connection-leak-timeout-in-seconds="0" connection-validation-method="table" datasource-classname="oracle.jdbc.pool.OracleConnectionPoolDataSource"
fail-all-connections="false" idle-timeout-in-seconds="2147483638" is-connection-validation-required="true"
is-isolation-level-guaranteed="false" lazy-connection-association="true" lazy-connection-enlistment="true"
match-connections="false" max-connection-usage-count="0" max-pool-size="60" max-wait-time-in-millis="60000"
name="company.jdbc.sc.nonxa.pool" non-transactional-connections="false" pool-resize-quantity="2"
res-type="javax.sql.ConnectionPoolDataSource" statement-timeout-in-seconds="300" steady-pool-size="16"
transaction-isolation-level="read-committed" validate-atmost-once-period-in-seconds="1" validation-table-name="SC_VALIDATE"
wrap-jdbc-objects="false">
<property name="DataSourceName" value="OracleNonXADataSource"/>
<property name="ImplicitCachingEnabled" value="false"/>
<property name="NetworkProtocol" value="tcp"/>
<property name="Password" value="password"/>
<property name="LoginTimeout" value="0"/>
<property name="URL" value="jdbc:oracle:thin:@oradbdev.company.ru:1521:COMPANY"/>
<property name="NativeXA" value="false"/>
<property name="User" value="prog10"/>
<property name="ExplicitCachingEnabled" value="false"/>
<property name="PortNumber" value="0"/>
<property name="MaxStatements" value="0"/>
</jdbc-connection-pool>
<jdbc-resource enabled="true" jndi-name="company.jdbc.sc.nonxa.db" object-type="user" pool-name="company.jdbc.sc.nonxa.pool"/>
</resources>
And now i need to start application inside embedded Jetty server for integration test. I'm trying to add connection pool in jetty.xml file like this:
<New id="DS" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>
<Ref id="wac"/>
</Arg>
<Arg>jdbc/DS</Arg>
<Arg>
<New class="oracle.jdbc.pool.OracleConnectionPoolDataSource">
<Set name="DataSourceName">OracleNonXADataSource</Set>
<Set name="ImplicitCachingEnabled">false</Set>
<Set name="NetworkProtocol">tcp</Set>
<Set name="Password">password</Set>
<Set name="LoginTimeout">0</Set>
<Set name="URL">jdbc:oracle:thin:@oradbdev.company.ru:1521:COMPANY</Set>
<Set name="NativeXA">false</Set>
<Set name="User">prog10</Set>
<Set name="ExplicitCachingEnabled">false</Set>
<Set name="PortNumber">0</Set>
<Set name="MaxStatements">0</Set>
</New>
</Arg>
</New>
It register connection pool, but i also nee to register jdbc-resource with given name.
How i can to do that?