commons-dev mailing list archives

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

Dirk

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.
>
>Thanks.
>Todd Carmichael
>Concur Technologies
>
>-----Original Message-----
>From: Henning P. Schmiedehausen [mailto:hps@intermeta.de] 
>Sent: Sunday, October 12, 2003 6:49 AM
>To: commons-dev@jakarta.apache.org
>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 (db.apache.org/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:
>org.apache.commons.dbcp.datasources.SharedPoolDataSource
>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
>validator....
>
>So, please, add a public modifier to InstanceKeyDataSource. Thanks.
>
>	Regards
>		Henning
>
>  
>




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message