commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd Carmichael <>
Subject RE: [DBCP] InstanceKeyDataSource
Date Mon, 13 Oct 2003 02:27:42 GMT
I second the motion for this change.  We are trying to evaluate and use
torque 3.1 and the latest dbcp and this is holding up our integration.

Todd Carmichael
Concur Technologies

-----Original Message-----
From: Henning P. Schmiedehausen [] 
Sent: Sunday, October 12, 2003 6:49 AM
Subject: [DBCP] InstanceKeyDataSource

Hello DBCP-Developers,

can we please get a "public" in front of the 

--- cut ---
abstract class InstanceKeyDataSource
        implements DataSource, Referenceable, Serializable {
--- cut ---

class definition.

Reason for this: 

Torque ( uses both commons-dbcp and also
commons-beanutils to set the properties of a data source. It does so by
calling PropertyUtils.setSimpleProperty() on a SharedPoolDataSource object
which in turn extends InstanceKeyDataSource.

Unfortunately, for resolving the accessibility of the property, BeanUtils
use MethodUtils from the BeanUtils package which notices that the class
which defines e.g. setValidationQuery() and
setTestOnBorrow() is not public and denies the property setting. So one
cannot set these properties from the Torque init. You get

ERROR - Property: testOnBorrow value: true is not supported by DataSource:
ERROR - Property: validationQuery value: SELECT 1 is not supported by
DataSource: org.apache.commons.dbcp.datasources.SharedPoolDataSource

which, of course, is wrong.
It's now argueable whether this is a bug in commons-beanutils (which should
see that the class itself (SharedPoolDataSource) which extends a non-public
class, making the properties visible, even if the declaring class
(InstanceKeyDataSource) is not public, however be it as it is, something
must change to make Torque work better with DBCP. And to me it's easier to
simply add a "public" to the class than redesigning the beanutils method

So, please, add a public modifier to InstanceKeyDataSource. Thanks.


Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH        +49 9131 50 654 0

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

"Dominate!! Dominate!! Eat your young and aggregate! I have grotty silicon!"

      -- AOL CD when played backwards  (User Friendly - 200-10-15)

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

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

View raw message