Martin,
It looks like unwrapping the connection in initializeJdbcConnection() is
causing another problem for managed connections in JBoss. Trying to
setStatementCacheSize throws the exception:
Caused by: java.sql.SQLException: Statement Caching cannot be enabled for
this logical connection.
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at
oracle.jdbc.driver.OracleConnection.setStatementCacheSize(OracleConnection.j
ava:4151)
This wasn't a problem previously since those methods weren't available on
the WrappedConnection object.
I'm not sure what the solution is. If statement caching is not allowed for
any pooled connections, maybe bypass unwrapping the Connection in this
method. Or, if it's just some managed environments that have problems,
maybe log the exception and move on instead of rethrowing PlatformException.
try
{
// Set number of cached statements and enable implicit caching
METHOD_SET_STATEMENT_CACHE_SIZE.invoke(oraConn,
PARAM_STATEMENT_CACHE_SIZE);
METHOD_SET_IMPLICIT_CACHING_ENABLED.invoke(oraConn, PARAM_BOOLEAN_TRUE);
}
catch (Exception e)
{
logger.debug("PlatformOracle9iImpl could not enable statement caching.");
}
What do you think?
Don
-----Original Message-----
From: Martin Kal�n [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 16, 2005 5:41 AM
To: OJB Users List
Subject: Re: Oracle Driver jdbc10.1.0.2
Don Lyon wrote:
> I ran into a similar problem using JBoss as the managed environment.
Could
> we add that to the list for 1.0.2?
Hello Don, thank you for your report.
> protected static final String UNWRAP_CONN_METHOD_NAMES[] =
> "getUnderlyingConnection" /* JBoss */
[...]
> protected static final String UNWRAP_PS_METHOD_NAMES[] =
> "getUnderlyingStatement" /* JBoss */
I have added your patch to CVS for 1.0.x branch and 1.1 trunk. Should be
out with 1.0.2 soon.
If you could please test and report your results to the list.
Thanks,
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
----------------------------------
The information contained in this e-mail message is intended only for the
personal and confidential use of the recipient(s) named above. If the reader
of this message is not the intended recipient or an agent responsible for
delivering it to the intended recipient, you are hereby notified that you
have received this communication in error and that any review,
dissemination, distribution, or copying of this message is strictly
prohibited. If you have received this communication in error, please notify
us immediately by e-mail, and delete the original message.