Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to configure Hibernate with UCP
    primarykey
    data
    text
    <p>Oracle is moving to Universal Connection Pool (UCP) for maintaining pooled connections that can be borrowed, returned or closed. My webapplication has this in place with its own data layer. This application will migrate to use JPA with Hibernate. At this point, I can only configure Hibernate to use the Oracle JDBC driver.</p> <p>How can Hibernate be configured to use UCP?</p> <p>There is documentation on how to use c3p0, but this does not work for UCP.</p> <p>This is my Hibenate configuration with a JDBC connection without UCP:</p> <pre><code>&lt;hibernate-configuration&gt; &lt;session-factory&gt; &lt;property name="hibernate.connection.driver_class"&gt;oracle.jdbc.driver.OracleDriver&lt;/property&gt; &lt;property name="hibernate.connection.url"&gt;jdbc:oracle:thin:@DBSERVER:1521:DATABASE&lt;/property&gt; &lt;property name="hibernate.connection.username"&gt;username&lt;/property&gt; &lt;property name="hibernate.connection.password"&gt;password&lt;/property&gt; &lt;property name="dialect"&gt;org.hibernate.dialect.OracleDialect&lt;/property&gt; .... &lt;mapping resource="Country.hbm.xml"/&gt; &lt;/session-factory&gt; &lt;/hibernate-configuration&gt; </code></pre> <p>These are my connection settings for UCP and JDBC for direct access without Hibernate:</p> <pre><code>PoolDataSource pds = PoolDataSourceFactory.getPoolDataSource(); pds.setConnectionFactoryClassName("oracle.jdbc.pool.OracleDataSource"); pds.setUser("username"); pds.setPassword("password"); pds.setConnectionFactoryProperty("driverType", "thin"); pds.setURL("jdbc:oracle:thin:@DBSERVER:1521:DATABASE"); pds.setInitialPoolSize(10); pds.setMaxPoolSize(200); </code></pre>
    singulars
    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.
 

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