commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Verbeeck <>
Subject Re: [DBCP] InstanceKeyDataSource
Date Mon, 13 Oct 2003 18:55:33 GMT
John fixed it already. It is include in 1.1RC2.


Todd Carmichael wrote:

>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.
>	Regards
>		Henning

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

View raw message