Hi,
I’d like to configure in my GF 3.1 a non-XA Oracle DataSource and be able
to use PreparedStatement caching as described in [3].
I wonder if there is a difference (from the GF point of view) between the
oracle.jdbc.pool.OracleDataSource [1] and OracleConnectionPoolDataSource [2]?
As stated in [4], I should use ConnectionPoolDataSource, however in fact it
doesn't matter, as in Glassfish "connections of all these three types of
datasources are transparently pooled".
What is the recommended way (best practices) of using PreparedStatement
Caches – to activate GF's own StatementCache (JDBC Wrappers required) or to
use the ImplicitCaching from the Oracle Driver (as shown in [1] and/or [2])?
Glassfish 3.1, build 43, Oracle Thin Driver 11.2.
thanks in advance for any hints,
makiey
[1]:
<resources>
<jdbc-connection-pool
name="myConnectionPool"
datasource-classname="oracle.jdbc.pool.OracleConnectionPoolDataSource"
res-type="javax.sql.ConnectionPoolDataSource"
steady-pool-size="100"
max-pool-size="100"
statement-cache-size="0"
ping="true"
is-connection-validation-required="false"
non-transactional-connections="false"
is-isolation-level-guaranteed="true"
transaction-isolation-level="read-committed"
wrap-jdbc-objects="false">
<property name="url" value="url"/>
<property name="user" value="user”/>
<property name="password" value="password"/>
<property name="implicitCachingEnabled” value=“true”/>
<property name=“implicitStatementCacheSize“ value=“300“/>
</jdbc-connection-pool>
<jdbc-resource
enabled="true"
jndi-name="myDataSource"
object-type="user"
pool-name="myConnectionPool "/>
</resources>
[2]:
<resources>
<jdbc-connection-pool
name="myConnectionPool"
datasource-classname="oracle.jdbc.pool.OracleDataSource"
res-type="javax.sql.DataSource"
steady-pool-size="100"
max-pool-size="100"
statement-cache-size="0"
ping="true"
is-connection-validation-required="false"
non-transactional-connections="false"
is-isolation-level-guaranteed="true"
transaction-isolation-level="read-committed"
wrap-jdbc-objects="false">
<property name="url" value="url"/>
<property name="user" value="user”/>
<property name="password" value="password"/>
<property name="implicitCachingEnabled” value=“true”/>
<property name=“implicitStatementCacheSize“ value=“300“/>
</jdbc-connection-pool>
<jdbc-resource
enabled="true"
jndi-name="myDataSource"
object-type="user"
pool-name="myConnectionPool "/>
</resources>
[3]:
http://www.oracle.com/technetwork/database/enterprise-edition/memory.pdf [1]
Page 9,10.
[4]:
http://markmail.org/message/b67pvfzg5pc42sf6 [2]
[1]
http://www.oracle.com/technetwork/database/enterprise-edition/memory.pdf
[2]
http://markmail.org/message/b67pvfzg5pc42sf6
--
[Message sent by forum member 'makiey']
View Post: http://forums.java.net/node/816423