Note that there are some explanatory texts on larger screens.

plurals
  1. POConfiguring jetty to work with JDBC datasource
    primarykey
    data
    text
    <p>i have an spring web application (on glassfish server) that use JDBC connection pool. It defined in XML file like this:</p> <pre><code>&lt;resources&gt; &lt;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"&gt; &lt;property name="DataSourceName" value="OracleNonXADataSource"/&gt; &lt;property name="ImplicitCachingEnabled" value="false"/&gt; &lt;property name="NetworkProtocol" value="tcp"/&gt; &lt;property name="Password" value="password"/&gt; &lt;property name="LoginTimeout" value="0"/&gt; &lt;property name="URL" value="jdbc:oracle:thin:@oradbdev.company.ru:1521:COMPANY"/&gt; &lt;property name="NativeXA" value="false"/&gt; &lt;property name="User" value="prog10"/&gt; &lt;property name="ExplicitCachingEnabled" value="false"/&gt; &lt;property name="PortNumber" value="0"/&gt; &lt;property name="MaxStatements" value="0"/&gt; &lt;/jdbc-connection-pool&gt; &lt;jdbc-resource enabled="true" jndi-name="company.jdbc.sc.nonxa.db" object-type="user" pool-name="company.jdbc.sc.nonxa.pool"/&gt; &lt;/resources&gt; </code></pre> <p>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:</p> <pre><code>&lt;New id="DS" class="org.mortbay.jetty.plus.naming.Resource"&gt; &lt;Arg&gt; &lt;Ref id="wac"/&gt; &lt;/Arg&gt; &lt;Arg&gt;jdbc/DS&lt;/Arg&gt; &lt;Arg&gt; &lt;New class="oracle.jdbc.pool.OracleConnectionPoolDataSource"&gt; &lt;Set name="DataSourceName"&gt;OracleNonXADataSource&lt;/Set&gt; &lt;Set name="ImplicitCachingEnabled"&gt;false&lt;/Set&gt; &lt;Set name="NetworkProtocol"&gt;tcp&lt;/Set&gt; &lt;Set name="Password"&gt;password&lt;/Set&gt; &lt;Set name="LoginTimeout"&gt;0&lt;/Set&gt; &lt;Set name="URL"&gt;jdbc:oracle:thin:@oradbdev.company.ru:1521:COMPANY&lt;/Set&gt; &lt;Set name="NativeXA"&gt;false&lt;/Set&gt; &lt;Set name="User"&gt;prog10&lt;/Set&gt; &lt;Set name="ExplicitCachingEnabled"&gt;false&lt;/Set&gt; &lt;Set name="PortNumber"&gt;0&lt;/Set&gt; &lt;Set name="MaxStatements"&gt;0&lt;/Set&gt; &lt;/New&gt; &lt;/Arg&gt; &lt;/New&gt; </code></pre> <p>It register connection pool, but i also nee to register jdbc-resource with given name.</p> <p>How i can to do that?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload