Affects Version/s: 1.3
Fix Version/s: 1.3
I am using DBCP from svn-trunk (rev 766626).
I am using the BasicManagedDatasource with the MysqlXADataSource.
Configuration of BasicDataSource:
If a ManagedConnection is put back to the connection pool it gets passivated (GenericObjectPool line 1101) by calling passivateObject() on the PoolableConnectionFactory which calls passivate() on the DelegatingConnection.
passivate() in DelegatingConnection then executes the following code:
This is an implicit cast from AbandonedTrace to Statement since getTrace() returns a list of AbandonedTrace instances.
If the list contains other instances than those, that implement Statement an ArrayStoreException is thrown at statements.toArray(set) (line 416). See http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html#toArray() for details.
I'd say this is a bug since AbandonedTrace does not implement Statement and there are derived classes that do not implement it also.
In my case the list returned by getTrace() contains instances of DelegatingDatabaseMetaData which causes the mentioned ArrayStoreException.