[jboss-cvs] JBossAS SVN: r102836 - branches/JBPAPP_4_2_0_GA_CP/connector/src/main/org/jboss/resource/adapter/jdbc/remote.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Mar 23 19:31:03 EDT 2010
Author: jbertram at redhat.com
Date: 2010-03-23 19:31:02 -0400 (Tue, 23 Mar 2010)
New Revision: 102836
Modified:
branches/JBPAPP_4_2_0_GA_CP/connector/src/main/org/jboss/resource/adapter/jdbc/remote/WrapperDataSourceService.java
Log:
JBPAPP-3972
Modified: branches/JBPAPP_4_2_0_GA_CP/connector/src/main/org/jboss/resource/adapter/jdbc/remote/WrapperDataSourceService.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/connector/src/main/org/jboss/resource/adapter/jdbc/remote/WrapperDataSourceService.java 2010-03-23 23:22:20 UTC (rev 102835)
+++ branches/JBPAPP_4_2_0_GA_CP/connector/src/main/org/jboss/resource/adapter/jdbc/remote/WrapperDataSourceService.java 2010-03-23 23:31:02 UTC (rev 102836)
@@ -206,6 +206,9 @@
Connection conn = (Connection) connectionMap.get(id);
if( conn == null )
{
+ if(method.getName().equals("isClosed"))
+ return true;
+
throw new IllegalAccessException("Failed to find connection: "+id);
}
value = doConnectionMethod(conn, method, args);
@@ -360,6 +363,15 @@
{
log.trace("doConnectionMethod, conn="+conn+", method="+method);
}
+
+ // Remove the connection and handle Connection.isClosed() in invoke()
+ if( method.getName().equals("close") )
+ {
+ Integer id = new Integer(conn.hashCode());
+ connectionMap.remove(id);
+ log.debug("Closed Connection="+id);
+ }
+
Object value = method.invoke(conn, args);
if( value instanceof Statement )
{
More information about the jboss-cvs-commits
mailing list