commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham King <>
Subject [dbcp] setReadOnly always being called
Date Mon, 20 Dec 2004 14:42:07 GMT

  Using Hibernate, DBCP and Sybase I am getting the following warning 
from Hibernate:

    010SK: Database cannot set connection option SET_READONLY_FALSE

  This is because DBCP's PoolableConnectionFactory.activateObject(..) 
method is calling 'setReadOnly' on the Connection and the database does 
not support it. Hibernate spots the warning and logs it.

  There is a guard in the 'activateObject' method to only call 
setReadOnly if '_defaultReadOnly' is not null. All the constructors of 
PoolableConnectionFactory set '_defaultReadOnly' to a 'boolean' so it 
will never be null.

  This goes against what the docs 
( say about 
the defaultReadOnly config parameter:  "If not set then the setReadOnly 
method will not be called".

  Has anyone else come across this ? Is there a workaround ? Should I 
log this as a bug ?

  Thanks in advance,
  Graham King.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message