[jboss-cvs] JBossAS SVN: r102846 - branches/JBPAPP_4_3_0_GA_CP03_JBPAPP-3973/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 22:29:00 EDT 2010


Author: jbertram at redhat.com
Date: 2010-03-23 22:28:59 -0400 (Tue, 23 Mar 2010)
New Revision: 102846

Modified:
   branches/JBPAPP_4_3_0_GA_CP03_JBPAPP-3973/connector/src/main/org/jboss/resource/adapter/jdbc/remote/WrapperDataSourceService.java
Log:
JBPAPP-3973

Modified: branches/JBPAPP_4_3_0_GA_CP03_JBPAPP-3973/connector/src/main/org/jboss/resource/adapter/jdbc/remote/WrapperDataSourceService.java
===================================================================
--- branches/JBPAPP_4_3_0_GA_CP03_JBPAPP-3973/connector/src/main/org/jboss/resource/adapter/jdbc/remote/WrapperDataSourceService.java	2010-03-24 02:19:30 UTC (rev 102845)
+++ branches/JBPAPP_4_3_0_GA_CP03_JBPAPP-3973/connector/src/main/org/jboss/resource/adapter/jdbc/remote/WrapperDataSourceService.java	2010-03-24 02:28:59 UTC (rev 102846)
@@ -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