You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@excalibur.apache.org by le...@apache.org on 2005/06/07 23:45:07 UTC
svn commit: r189447 -
/excalibur/trunk/components/datasource/src/java/org/apache/avalon/excalibur/datasource/AbstractJdbcConnection.java
Author: leif
Date: Tue Jun 7 14:45:02 2005
New Revision: 189447
URL: http://svn.apache.org/viewcvs?rev=189447&view=rev
Log:
Fix a probem where ResultSet.getMetaData() was not correctly returning a ResultSetMetaData on HSQL database connections due to a problem with the generation of Proxies.
Modified:
excalibur/trunk/components/datasource/src/java/org/apache/avalon/excalibur/datasource/AbstractJdbcConnection.java
Modified: excalibur/trunk/components/datasource/src/java/org/apache/avalon/excalibur/datasource/AbstractJdbcConnection.java
URL: http://svn.apache.org/viewcvs/excalibur/trunk/components/datasource/src/java/org/apache/avalon/excalibur/datasource/AbstractJdbcConnection.java?rev=189447&r1=189446&r2=189447&view=diff
==============================================================================
--- excalibur/trunk/components/datasource/src/java/org/apache/avalon/excalibur/datasource/AbstractJdbcConnection.java (original)
+++ excalibur/trunk/components/datasource/src/java/org/apache/avalon/excalibur/datasource/AbstractJdbcConnection.java Tue Jun 7 14:45:02 2005
@@ -486,6 +486,13 @@
retVal = Proxy.newProxyInstance( Array.class.getClassLoader(),
new Class[] { Array.class }, new ProxiedObject( retVal ) );
}
+ else if ( ( retVal instanceof ResultSet ) && ( retVal instanceof ResultSetMetaData ) )
+ {
+ // The HSQLDB driver needs this to make things work correctly.
+ retVal = Proxy.newProxyInstance( ResultSet.class.getClassLoader(),
+ new Class[] { ResultSet.class, ResultSetMetaData.class },
+ new ProxiedObject( retVal ) );
+ }
else if ( retVal instanceof ResultSet )
{
retVal = Proxy.newProxyInstance( ResultSet.class.getClassLoader(),
---------------------------------------------------------------------
To unsubscribe, e-mail: scm-unsubscribe@excalibur.apache.org
For additional commands, e-mail: scm-help@excalibur.apache.org