1

How can I go about setting up an Oracle 10g connection pool in Jetty. I had a look at http://docs.codehaus.org/display/JETTY/DataSource+Examples, and Oracle 10g is listed under Non-pooling Data Sources, does that mean i cannot have an oracle connection pool or is there a different way?

1 Answer 1

2

I had trouble with this as well. I could not get the OracleConnectionPoolDataSource to work with pools as I saw some examples use. I used the more general OracleDataSource and it worked.

<New id="terminalfour" class="org.eclipse.jetty.plus.jndi.Resource">
        <Arg/>
        <Arg>jdbc/SiteManagerDB</Arg>
        <Arg>
            <New class="oracle.jdbc.pool.OracleDataSource">
                <Set name="URL">jdbc:oracle:oci:@server</Set>
                <Set name="User">user</Set>
                <Set name="Password">*****</Set>
                <Set name="ConnectionCachingEnabled">true</Set>
                <Set name="ConnectionCacheProperties">
                    <New class="java.util.Properties">
                        <Call name="setProperty">
                            <Arg type="java.lang.String">InactivityTimeout</Arg>
                            <Arg type="java.lang.String">300</Arg>
                        </Call>
                        <Call name="setProperty">
                            <Arg type="java.lang.String">AbandonedConnectionTimeout</Arg>
                            <Arg type="java.lang.String">600</Arg>
                        </Call>
                        <Call name="setProperty">
                            <Arg type="java.lang.String">TimeToLiveTimeout</Arg>
                            <Arg type="java.lang.String">600</Arg>
                        </Call>
                        <Call name="setProperty">
                            <Arg type="java.lang.String">InitialLimit</Arg>
                            <Arg type="java.lang.String">10</Arg>
                        </Call>
                        <Call name="setProperty">
                            <Arg type="java.lang.String">MaxStatementsLimit</Arg>
                            <Arg type="java.lang.String">50</Arg>
                        </Call>
                        <Call name="setProperty">
                            <Arg type="java.lang.String">MinLimit</Arg>
                            <Arg type="java.lang.String">20</Arg>
                        </Call>
                    </New>
                </Set>
            </New>
        </Arg>
    </New>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.