commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham King <gra...@darkcoding.net>
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 
(http://jakarta.apache.org/commons/dbcp/configuration.html) 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: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message