[jboss-cvs] JBossAS SVN: r67613 - in trunk/connector: src/main/org/jboss/resource/adapter/jdbc and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Nov 29 11:25:51 EST 2007


Author: adrian at jboss.org
Date: 2007-11-29 11:25:51 -0500 (Thu, 29 Nov 2007)
New Revision: 67613

Added:
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/JBossWrapper.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedConnectionFactory.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedCallableStatementJDK5.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedPreparedStatementJDK5.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedCallableStatementJDK5.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionFactoryJDK5.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionJDK5.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedPreparedStatementJDK5.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedResultSetJDK5.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedStatementJDK5.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedCallableStatementJDK6.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedPreparedStatementJDK6.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedCallableStatementJDK6.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionFactoryJDK6.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionJDK6.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedPreparedStatementJDK6.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedResultSetJDK6.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedStatementJDK6.java
Modified:
   trunk/connector/.classpath
   trunk/connector/build.xml
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnection.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/CachedCallableStatement.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/CachedPreparedStatement.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedCallableStatement.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedConnection.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedPreparedStatement.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedResultSet.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedStatement.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrapperDataSource.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/remote/SerializableParameterMetaData.java
   trunk/connector/src/main/org/jboss/resource/adapter/jdbc/remote/SerializableResultSetMetaData.java
Log:
Compiling on Java6: introduce alternate wrappers for JDK5/6

Modified: trunk/connector/.classpath
===================================================================
--- trunk/connector/.classpath	2007-11-29 16:18:57 UTC (rev 67612)
+++ trunk/connector/.classpath	2007-11-29 16:25:51 UTC (rev 67613)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src/main"/>
+	<classpathentry excluding="org/jboss/resource/adapter/jdbc/jdk5/|org/jboss/resource/adapter/jdbc/jdk6/" kind="src" path="src/main"/>
 	<classpathentry kind="src" path="src/tests"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="src" path="/j2se"/>

Modified: trunk/connector/build.xml
===================================================================
--- trunk/connector/build.xml	2007-11-29 16:18:57 UTC (rev 67612)
+++ trunk/connector/build.xml	2007-11-29 16:25:51 UTC (rev 67613)
@@ -212,7 +212,8 @@
     description="Compile all source files."/>
 
   <!-- Compile all class files -->
-  <target name="compile-classes" depends="init">
+  <target name="compile-classes" depends="compile-classes-jdk5, compile-classes-jdk6"/>
+  <target name="compile-classes-jdk5" depends="init" unless="HAVE_JDK_1.6">
     <mkdir dir="${build.classes}"/>
 
     <!-- compile the non adapter classes from regular source -->
@@ -226,13 +227,32 @@
       deprecation="${javac.deprecation}"
       includeAntRuntime="${javac.include.ant.runtime}"
       includeJavaRuntime="${javac.include.java.runtime}"
-      includes="${javac.includes}"
-      excludes="${javac.excludes}"
       failonerror="${javac.fail.onerror}">
       <src path="${source.java}"/>
+      <exclude name="org/jboss/resource/adapter/jdbc/jdk6/**"/>
       <classpath refid="javac.classpath"/>
     </javac>
   </target>
+  <target name="compile-classes-jdk6" depends="init" if="HAVE_JDK_1.6">
+    <mkdir dir="${build.classes}"/>
+
+    <!-- compile the non adapter classes from regular source -->
+    <javac destdir="${build.classes}"
+      optimize="${javac.optimize}"
+      target="${javac.target}"
+      source="${javac.source}"
+      debug="${javac.debug}"
+      depend="${javac.depend}"
+      verbose="${javac.verbose}"
+      deprecation="${javac.deprecation}"
+      includeAntRuntime="${javac.include.ant.runtime}"
+      includeJavaRuntime="${javac.include.java.runtime}"
+      failonerror="${javac.fail.onerror}">
+      <src path="${source.java}"/>
+      <exclude name="org/jboss/resource/adapter/jdbc/jdk5/**"/>
+      <classpath refid="javac.classpath"/>
+    </javac>
+  </target>
  
   <!-- Compile resource files -->
   <target name="compile-resources" depends="init">
@@ -316,6 +336,8 @@
     <jar jarfile="${build.lib}/jboss-common-jdbc-wrapper.jar"
       manifest="${build.etc}/default.mf">
       <fileset dir="${build.classes}">
+        <include name="org/jboss/resource/adapter/jdbc/JBossWrapper.class"/>
+        <include name="org/jboss/resource/adapter/jdbc/WrapperConnectionFactory.class"/>
         <include name="org/jboss/resource/adapter/jdbc/ExceptionSorter.class"/>
         <include name="org/jboss/resource/adapter/jdbc/CheckValidConnectionSQL.class"/>
         <include name="org/jboss/resource/adapter/jdbc/ValidConnectionChecker.class"/>
@@ -329,6 +351,8 @@
         <include name="org/jboss/resource/adapter/jdbc/CachedPreparedStatement.class"/>
         <include name="org/jboss/resource/adapter/jdbc/PreparedStatementCache*.class"/>
         <include name="org/jboss/resource/adapter/jdbc/StatementAccess.class"/>
+        <include name="org/jboss/resource/adapter/jdbc/jdk5/*.class"/>
+        <include name="org/jboss/resource/adapter/jdbc/jdk6/*.class"/>
 		<include name="org/jboss/resource/adapter/jdbc/URLSelectorStrategy.class"/>
         <include name="org/jboss/resource/adapter/jdbc/remote/*"/>
         <!-- JBAS-2250 hack -->
@@ -479,6 +503,7 @@
         <include name="org/jboss/resource/JBossResourceException.class"/>
         <include name="org/jboss/resource/adapter/jdbc/remote/*"/>
         <include name="org/jboss/resource/connectionmanager/JBossLocalXAException.class"/>
+        <include name="org/jboss/resource/adapter/jdbc/JBossWrapper.class"/>
       </fileset>
     </jar>
 

Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnection.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnection.java	2007-11-29 16:18:57 UTC (rev 67612)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnection.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -60,6 +60,8 @@
 
 public abstract class BaseWrapperManagedConnection implements ManagedConnection
 {
+   private static final WrappedConnectionFactory wrappedConnectionFactory;
+   
    protected final BaseWrapperManagedConnectionFactory mcf;
 
    protected final Connection con;
@@ -93,6 +95,34 @@
    protected int jdbcTransactionIsolation;
 
    protected boolean destroyed = false;
+   
+   static
+   {
+      Class connectionFactory = null;
+      try
+      {
+         connectionFactory = BaseWrapperManagedConnection.class.forName("org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionFactoryJDK6");
+      }
+      catch (ClassNotFoundException e)
+      {
+         try
+         {
+            connectionFactory = BaseWrapperManagedConnection.class.forName("org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionFactoryJDK5");
+         }
+         catch (ClassNotFoundException ex)
+         {
+            throw new RuntimeException("Unabled to load wrapped connection factory", ex);
+         }
+      }
+      try
+      {
+         wrappedConnectionFactory = (WrappedConnectionFactory) connectionFactory.newInstance();
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException("Error initializign connection factory", e);
+      }
+   }
 
    public BaseWrapperManagedConnection(final BaseWrapperManagedConnectionFactory mcf, final Connection con,
          final Properties props, final int transactionIsolation, final int psCacheSize) throws SQLException
@@ -211,7 +241,7 @@
    public Object getConnection(Subject subject, ConnectionRequestInfo cri) throws ResourceException
    {
       checkIdentity(subject, cri);
-      WrappedConnection lc = new WrappedConnection(this);
+      WrappedConnection lc = wrappedConnectionFactory.createWrappedConnection(this);
       synchronized (handles)
       {
          handles.add(lc);
@@ -372,7 +402,7 @@
          else
          {
             PreparedStatement ps = doPrepareStatement(sql, resultSetType, resultSetConcurrency);
-            cachedps = new CachedPreparedStatement(ps);
+            cachedps = wrappedConnectionFactory.createCachedPreparedStatement(ps);
             psCache.insert(key, cachedps);
          }
          return cachedps;
@@ -403,7 +433,7 @@
          else
          {
             CallableStatement cs = doPrepareCall(sql, resultSetType, resultSetConcurrency);
-            cachedps = new CachedCallableStatement(cs);
+            cachedps = wrappedConnectionFactory.createCachedCallableStatement(cs);
             psCache.insert(key, cachedps);
          }
          return cachedps;

Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/CachedCallableStatement.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/CachedCallableStatement.java	2007-11-29 16:18:57 UTC (rev 67612)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/CachedCallableStatement.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -44,7 +44,7 @@
  * @author Scott.Stark at jboss.org
  * @version $Revision$
  */
-public class CachedCallableStatement extends CachedPreparedStatement
+public abstract class CachedCallableStatement extends CachedPreparedStatement
    implements CallableStatement
 {
    private final CallableStatement cs;
@@ -305,6 +305,7 @@
       cs.setObject(parameterName, x, targetSqlType, scale);
    }
 
+   @SuppressWarnings("unchecked")
    public Object getObject(int i, Map map) throws SQLException
    {
       return cs.getObject(i, map);
@@ -415,6 +416,7 @@
       return cs.getTimestamp(parameterIndex, cal);
    }
 
+   @SuppressWarnings("unchecked")
    public Object getObject(String parameterName, Map map) throws SQLException
    {
       return cs.getObject(parameterName, map);
@@ -450,4 +452,9 @@
       cs.setTimestamp(parameterName, x, cal);
    }
 
+   protected CallableStatement getWrappedObject() throws SQLException
+   {
+      return cs;
+   }
+
 }

Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/CachedPreparedStatement.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/CachedPreparedStatement.java	2007-11-29 16:18:57 UTC (rev 67612)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/CachedPreparedStatement.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -46,7 +46,7 @@
  * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
-public class CachedPreparedStatement implements PreparedStatement
+public abstract class CachedPreparedStatement extends JBossWrapper implements PreparedStatement
 {
    private PreparedStatement ps;
    private SynchronizedBoolean cached = new SynchronizedBoolean(true);
@@ -174,9 +174,7 @@
       ps.setAsciiStream(parameterIndex, x, length);
    }
 
-   /**
-    * @deprecated
-    */
+   @Deprecated
    public void setUnicodeStream(int parameterIndex, java.io.InputStream x,
                                 int length) throws SQLException
    {
@@ -527,4 +525,9 @@
    {
       return ps.getResultSetHoldability();
    }
+
+   protected PreparedStatement getWrappedObject() throws SQLException
+   {
+      return ps;
+   }
 }

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/JBossWrapper.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/JBossWrapper.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/JBossWrapper.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,62 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc;
+
+import java.io.Serializable;
+import java.sql.SQLException;
+
+/**
+ * JBossWrapper.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JBossWrapper implements Serializable
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -4018404397552543628L;
+
+   public boolean isWrapperFor(Class<?> iface) throws SQLException
+   {
+      if (iface == null)
+         throw new IllegalArgumentException("Null interface");
+      Object wrapped = getWrappedObject();
+      if (wrapped == null)
+         return false;
+      return iface.isAssignableFrom(wrapped.getClass());
+   }
+
+   public <T> T unwrap(Class<T> iface) throws SQLException
+   {
+      if (iface == null)
+         throw new IllegalArgumentException("Null interface");
+      Object wrapped = getWrappedObject();
+      if (wrapped != null && iface.isAssignableFrom(wrapped.getClass()))
+         return iface.cast(wrapped);
+      throw new SQLException("Not a wrapper for: " + iface.getName());
+   }
+   
+   protected Object getWrappedObject() throws SQLException
+   {
+      return null;
+   }
+}

Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedCallableStatement.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedCallableStatement.java	2007-11-29 16:18:57 UTC (rev 67612)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedCallableStatement.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -30,6 +30,7 @@
 import java.sql.CallableStatement;
 import java.sql.Clob;
 import java.sql.Date;
+import java.sql.PreparedStatement;
 import java.sql.Ref;
 import java.sql.SQLException;
 import java.sql.Time;
@@ -44,7 +45,7 @@
  * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
-public class WrappedCallableStatement extends WrappedPreparedStatement implements CallableStatement
+public abstract class WrappedCallableStatement extends WrappedPreparedStatement implements CallableStatement
 {
    private final CallableStatement cs;
 
@@ -54,6 +55,11 @@
       this.cs = cs;
    }
 
+   public CallableStatement getUnderlyingStatement() throws SQLException
+   {
+      return (CallableStatement) super.getUnderlyingStatement();
+   }
+
    public Object getObject(int parameterIndex) throws SQLException
    {
       checkState();
@@ -1083,4 +1089,9 @@
          throw checkException(t);
       }
    }
+
+   protected CallableStatement getWrappedObject() throws SQLException
+   {
+      return cs;
+   }
 }

Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedConnection.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedConnection.java	2007-11-29 16:18:57 UTC (rev 67612)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedConnection.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -44,7 +44,7 @@
  * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
-public class WrappedConnection implements Connection
+public abstract class WrappedConnection extends JBossWrapper implements Connection
 {
    private static final Logger log = Logger.getLogger(WrappedConnection.class);
 
@@ -52,7 +52,7 @@
 
    private WrapperDataSource dataSource;
    
-   private HashMap statements;
+   private HashMap<WrappedStatement, Throwable> statements;
 
    private boolean closed = false;
 
@@ -105,13 +105,13 @@
             {
                if (statements != null)
                {
-                  for (Iterator i = statements.entrySet().iterator(); i.hasNext(); )
+                  for (Iterator<Map.Entry<WrappedStatement, Throwable>> i = statements.entrySet().iterator(); i.hasNext(); )
                   {
-                     Map.Entry entry = (Map.Entry) i.next();
-                     WrappedStatement ws = (WrappedStatement) entry.getKey();
+                     Map.Entry<WrappedStatement, Throwable> entry = i.next();
+                     WrappedStatement ws = entry.getKey();
                      if (trackStatements == BaseWrapperManagedConnectionFactory.TRACK_STATEMENTS_TRUE_INT)
                      {
-                        Throwable stackTrace = (Throwable) entry.getValue();
+                        Throwable stackTrace = entry.getValue();
                         log.warn("Closing a statement you left open, please do your own housekeeping", stackTrace);
                      }
                      try
@@ -137,12 +137,14 @@
       return closed;
    }
 
+   protected abstract WrappedStatement wrapStatement(Statement statement);
+   
    public Statement createStatement() throws SQLException
    {
       checkTransaction();
       try
       {
-         return new WrappedStatement(this, mc.getConnection().createStatement());
+         return wrapStatement(mc.getConnection().createStatement());
       }
       catch (Throwable t)
       {
@@ -155,7 +157,7 @@
       checkTransaction();
       try
       {
-         return new WrappedStatement(this, mc.getConnection().createStatement(resultSetType, resultSetConcurrency));
+         return wrapStatement(mc.getConnection().createStatement(resultSetType, resultSetConcurrency));
       }
       catch (Throwable t)
       {
@@ -170,7 +172,7 @@
       checkTransaction();
       try
       {
-         return new WrappedStatement(this, mc.getConnection()
+         return wrapStatement(mc.getConnection()
                .createStatement(resultSetType, resultSetConcurrency, resultSetHoldability));
       }
       catch (Throwable t)
@@ -179,12 +181,14 @@
       }
    }
 
+   protected abstract WrappedPreparedStatement wrapPreparedStatement(PreparedStatement statement);
+
    public PreparedStatement prepareStatement(String sql) throws SQLException
    {
       checkTransaction();
       try
       {
-         return new WrappedPreparedStatement(this, mc.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY));
+         return wrapPreparedStatement(mc.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY));
       }
       catch (Throwable t)
       {
@@ -198,7 +202,7 @@
       checkTransaction();
       try
       {
-         return new WrappedPreparedStatement(this, mc.prepareStatement(sql, resultSetType, resultSetConcurrency));
+         return wrapPreparedStatement(mc.prepareStatement(sql, resultSetType, resultSetConcurrency));
       }
       catch (Throwable t)
       {
@@ -212,7 +216,7 @@
       checkTransaction();
       try
       {
-         return new WrappedPreparedStatement(this, mc.getConnection()
+         return wrapPreparedStatement(mc.getConnection()
                .prepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability));
       }
       catch (Throwable t)
@@ -226,7 +230,7 @@
       checkTransaction();
       try
       {
-         return new WrappedPreparedStatement(this, mc.getConnection().prepareStatement(sql, autoGeneratedKeys));
+         return wrapPreparedStatement(mc.getConnection().prepareStatement(sql, autoGeneratedKeys));
       }
       catch (Throwable t)
       {
@@ -239,7 +243,7 @@
       checkTransaction();
       try
       {
-         return new WrappedPreparedStatement(this, mc.getConnection().prepareStatement(sql, columnIndexes));
+         return wrapPreparedStatement(mc.getConnection().prepareStatement(sql, columnIndexes));
       }
       catch (Throwable t)
       {
@@ -253,7 +257,7 @@
       checkTransaction();
       try
       {
-         return new WrappedPreparedStatement(this, mc.getConnection().prepareStatement(sql, columnNames));
+         return wrapPreparedStatement(mc.getConnection().prepareStatement(sql, columnNames));
       }
       catch (Throwable t)
       {
@@ -261,12 +265,14 @@
       }
    }
 
+   protected abstract WrappedCallableStatement wrapCallableStatement(CallableStatement statement);
+
    public CallableStatement prepareCall(String sql) throws SQLException
    {
       checkTransaction();
       try
       {
-         return new WrappedCallableStatement(this, mc.prepareCall(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY));
+         return wrapCallableStatement(mc.prepareCall(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY));
       }
       catch (Throwable t)
       {
@@ -279,7 +285,7 @@
       checkTransaction();
       try
       {
-         return new WrappedCallableStatement(this, mc.prepareCall(sql, resultSetType, resultSetConcurrency));
+         return wrapCallableStatement(mc.prepareCall(sql, resultSetType, resultSetConcurrency));
       }
       catch (Throwable t)
       {
@@ -294,7 +300,7 @@
       checkTransaction();
       try
       {
-         return new WrappedCallableStatement(this, mc.getConnection()
+         return wrapCallableStatement(mc.getConnection()
                .prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability));
       }
       catch (Throwable t)
@@ -422,6 +428,7 @@
       }
    }
 
+   @SuppressWarnings("unchecked")
    public Map getTypeMap() throws SQLException
    {
       checkTransaction();
@@ -435,6 +442,7 @@
       }
    }
 
+   @SuppressWarnings("unchecked")
    public void setTypeMap(Map typeMap) throws SQLException
    {
       checkTransaction();
@@ -519,8 +527,13 @@
       return mc.getConnection();
    }
 
-   void checkTransaction() throws SQLException
+   protected Connection getWrappedObject() throws SQLException
    {
+      return getUnderlyingConnection();
+   }
+
+   protected void checkTransaction() throws SQLException
+   {
       checkStatus();
       mc.checkTransaction();
    }
@@ -544,8 +557,9 @@
     * the ManagedConnection of the error. Subclasses may override this to
     * filter exceptions based on their severity.
     * 
-    * @param e a <code>SQLException</code> value
-    * @exception Exception if an error occurs
+    * @param t a throwable
+    * @return the sql exception
+    * @exception SQLException if an error occurs
     */
    protected SQLException checkException(Throwable t) throws SQLException
    {
@@ -578,7 +592,7 @@
       synchronized (this)
       {
          if (statements == null)
-            statements = new HashMap();
+            statements = new HashMap<WrappedStatement, Throwable>();
          
          if (trackStatements == BaseWrapperManagedConnectionFactory.TRACK_STATEMENTS_TRUE_INT)
             statements.put(ws, new Throwable("STACKTRACE"));

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedConnectionFactory.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedConnectionFactory.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedConnectionFactory.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc;
+
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+/**
+ * WrappedConnectionFactory.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public interface WrappedConnectionFactory
+{
+   WrappedConnection createWrappedConnection(BaseWrapperManagedConnection mc);
+
+   CachedPreparedStatement createCachedPreparedStatement(PreparedStatement ps) throws SQLException;
+
+   CachedCallableStatement createCachedCallableStatement(CallableStatement cs) throws SQLException;
+}

Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedPreparedStatement.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedPreparedStatement.java	2007-11-29 16:18:57 UTC (rev 67612)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedPreparedStatement.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -35,7 +35,6 @@
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
 import java.sql.SQLException;
-import java.sql.Statement;
 import java.sql.Time;
 import java.sql.Timestamp;
 import java.util.Calendar;
@@ -47,7 +46,7 @@
  * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
-public class WrappedPreparedStatement extends WrappedStatement implements PreparedStatement 
+public abstract class WrappedPreparedStatement extends WrappedStatement implements PreparedStatement 
 {
    private final PreparedStatement ps;
 
@@ -57,7 +56,7 @@
       this.ps = ps;
    }
 
-   public Statement getUnderlyingStatement() throws SQLException
+   public PreparedStatement getUnderlyingStatement() throws SQLException
    {
       checkState();
       if (ps instanceof CachedPreparedStatement)
@@ -386,9 +385,7 @@
       }
    }
 
-   /**
-    * @deprecated
-    */
+   @Deprecated
    public void setAsciiStream(int parameterIndex, InputStream stream, int length) throws SQLException
    {
       checkState();
@@ -402,9 +399,7 @@
       }
    }
 
-   /**
-    * @deprecated
-    */
+   @Deprecated
    public void setUnicodeStream(int parameterIndex, InputStream stream, int length) throws SQLException
    {
       checkState();
@@ -560,4 +555,9 @@
          throw checkException(t);
       }
    }
+
+   protected PreparedStatement getWrappedObject() throws SQLException
+   {
+      return ps;
+   }
 }

Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedResultSet.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedResultSet.java	2007-11-29 16:18:57 UTC (rev 67612)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedResultSet.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -46,7 +46,7 @@
  * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
-public class WrappedResultSet implements ResultSet
+public abstract class WrappedResultSet extends JBossWrapper implements ResultSet
 {
    /** The wrapped statement */
    private WrappedStatement statement;
@@ -286,9 +286,7 @@
       }
    }
 
-   /**
-    * @deprecated
-    */
+   @Deprecated
    public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
    {
       checkState();
@@ -315,9 +313,7 @@
       }
    }
 
-   /**
-    * @deprecated
-    */
+   @Deprecated
    public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException
    {
       checkState();
@@ -747,6 +743,7 @@
       }
    }
 
+   @SuppressWarnings("unchecked")
    public Object getObject(int i, Map map) throws SQLException
    {
       checkState();
@@ -773,6 +770,7 @@
       }
    }
 
+   @SuppressWarnings("unchecked")
    public Object getObject(String colName, Map map) throws SQLException
    {
       checkState();
@@ -1000,9 +998,7 @@
       }
    }
 
-   /**
-    * @deprecated
-    */
+   @Deprecated
    public InputStream getUnicodeStream(int columnIndex) throws SQLException
    {
       checkState();
@@ -1016,9 +1012,7 @@
       }
    }
 
-   /**
-    * @deprecated
-    */
+   @Deprecated
    public InputStream getUnicodeStream(String columnName) throws SQLException
    {
       try
@@ -1915,8 +1909,13 @@
       }
    }
 
-   SQLException checkException(Throwable t) throws SQLException
+   protected ResultSet getWrappedObject() throws SQLException
    {
+      return resultSet;
+   }
+
+   protected SQLException checkException(Throwable t) throws SQLException
+   {
       throw statement.checkException(t);
    }
    

Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedStatement.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedStatement.java	2007-11-29 16:18:57 UTC (rev 67612)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedStatement.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -39,14 +39,14 @@
  * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
-public class WrappedStatement implements Statement, StatementAccess,
+public abstract class WrappedStatement extends JBossWrapper implements Statement, StatementAccess,
    org.jboss.ejb.plugins.cmp.jdbc.WrappedStatement
 {
    private final WrappedConnection lc;
    private final Statement s;
 
    /** The result sets */
-   private HashMap resultSets;
+   private HashMap<WrappedResultSet, Throwable> resultSets;
 
    /** Whether we are closed */
    private boolean closed = false;
@@ -556,6 +556,11 @@
       return s;
    }
 
+   protected Statement getWrappedObject() throws SQLException
+   {
+      return s;
+   }
+
    protected SQLException checkException(Throwable t)
       throws SQLException
    {
@@ -599,23 +604,27 @@
       }
    }
 
+   protected abstract WrappedResultSet wrapResultSet(ResultSet resultSet);
+   
    protected ResultSet registerResultSet(ResultSet resultSet)
    {
       if (resultSet != null)
-         resultSet = new WrappedResultSet(this, resultSet);
+         resultSet = wrapResultSet(resultSet);
       
       if (lc.getTrackStatements() == BaseWrapperManagedConnectionFactory.TRACK_STATEMENTS_FALSE_INT)
          return resultSet;
 
+      WrappedResultSet wrapped = (WrappedResultSet) resultSet;
+      
       synchronized (this)
       {
          if (resultSets == null)
-            resultSets = new HashMap();
+            resultSets = new HashMap<WrappedResultSet, Throwable>();
          
          if (lc.getTrackStatements() == BaseWrapperManagedConnectionFactory.TRACK_STATEMENTS_TRUE_INT)
-            resultSets.put(resultSet, new Throwable("STACKTRACE"));
+            resultSets.put(wrapped, new Throwable("STACKTRACE"));
          else
-            resultSets.put(resultSet, null);
+            resultSets.put(wrapped, null);
       }
       return resultSet;
    }
@@ -641,13 +650,13 @@
       {
          if (resultSets == null)
             return;
-         for (Iterator i = resultSets.entrySet().iterator(); i.hasNext();)
+         for (Iterator<Map.Entry<WrappedResultSet, Throwable>> i = resultSets.entrySet().iterator(); i.hasNext();)
          {
-            Map.Entry entry = (Map.Entry) i.next();
-            WrappedResultSet resultSet = (WrappedResultSet) entry.getKey();
+            Map.Entry<WrappedResultSet, Throwable> entry = i.next();
+            WrappedResultSet resultSet = entry.getKey();
             if (lc.getTrackStatements() == BaseWrapperManagedConnectionFactory.TRACK_STATEMENTS_TRUE_INT)
             {
-               Throwable stackTrace = (Throwable) entry.getValue();
+               Throwable stackTrace = entry.getValue();
                lc.getLogger().warn("Closing a result set you left open! Please close it yourself.", stackTrace);
             }
             try

Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrapperDataSource.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrapperDataSource.java	2007-11-29 16:18:57 UTC (rev 67612)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrapperDataSource.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -44,7 +44,7 @@
  * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
-public class WrapperDataSource implements Referenceable, DataSource, Serializable  
+public class WrapperDataSource extends JBossWrapper implements Referenceable, DataSource, Serializable  
 {
    static final long serialVersionUID = 3570285419164793501L;
    
@@ -109,7 +109,7 @@
          throw new NestedSQLException(re);
       }
    }
-   
+
    public void setReference(final Reference reference)
    {
       this.reference = reference;

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedCallableStatementJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedCallableStatementJDK5.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedCallableStatementJDK5.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.CallableStatement;
+import java.sql.SQLException;
+
+import org.jboss.resource.adapter.jdbc.CachedCallableStatement;
+
+/**
+ * CachedCallableStatementJDK5.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class CachedCallableStatementJDK5 extends CachedCallableStatement
+{
+   public CachedCallableStatementJDK5(CallableStatement cs) throws SQLException
+   {
+      super(cs);
+   }
+
+}

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedPreparedStatementJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedPreparedStatementJDK5.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedPreparedStatementJDK5.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+import org.jboss.resource.adapter.jdbc.CachedPreparedStatement;
+
+/**
+ * CachedPreparedStatementJDK5.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class CachedPreparedStatementJDK5 extends CachedPreparedStatement
+{
+   public CachedPreparedStatementJDK5(PreparedStatement ps) throws SQLException
+   {
+      super(ps);
+   }
+
+}

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedCallableStatementJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedCallableStatementJDK5.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedCallableStatementJDK5.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.jboss.resource.adapter.jdbc.WrappedCallableStatement;
+import org.jboss.resource.adapter.jdbc.WrappedPreparedStatement;
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+
+/**
+ * WrappedCallableStatementJDK5.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedCallableStatementJDK5 extends WrappedCallableStatement
+{
+   public WrappedCallableStatementJDK5(WrappedConnectionJDK5 lc, CallableStatement s)
+   {
+      super(lc, s);
+   }
+   
+   protected WrappedResultSet wrapResultSet(ResultSet resultSet)
+   {
+      return new WrappedResultSetJDK5(this, resultSet);
+   }
+}

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionFactoryJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionFactoryJDK5.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionFactoryJDK5.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,56 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+import org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection;
+import org.jboss.resource.adapter.jdbc.CachedCallableStatement;
+import org.jboss.resource.adapter.jdbc.CachedPreparedStatement;
+import org.jboss.resource.adapter.jdbc.WrappedConnection;
+import org.jboss.resource.adapter.jdbc.WrappedConnectionFactory;
+
+/**
+ * WrappedConnectionFactoryJDK5
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedConnectionFactoryJDK5 implements WrappedConnectionFactory
+{
+   public WrappedConnection createWrappedConnection(BaseWrapperManagedConnection mc)
+   {
+      return new WrappedConnectionJDK5(mc);
+   }
+
+   public CachedPreparedStatement createCachedPreparedStatement(PreparedStatement ps) throws SQLException
+   {
+      return new CachedPreparedStatementJDK5(ps);
+   }
+
+   public CachedCallableStatement createCachedCallableStatement(CallableStatement cs) throws SQLException
+   {
+      return new CachedCallableStatementJDK5(cs);
+   }
+}

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionJDK5.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionJDK5.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,66 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
+import java.sql.Statement;
+
+import org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection;
+import org.jboss.resource.adapter.jdbc.WrappedCallableStatement;
+import org.jboss.resource.adapter.jdbc.WrappedConnection;
+import org.jboss.resource.adapter.jdbc.WrappedPreparedStatement;
+import org.jboss.resource.adapter.jdbc.WrappedStatement;
+
+/**
+ * WrappedConnectionJDK6.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedConnectionJDK5 extends WrappedConnection
+{
+   /**
+    * Create a new WrappedConnectionJDK5.
+    * 
+    * @param mc the managed connection
+    */
+   public WrappedConnectionJDK5(BaseWrapperManagedConnection mc)
+   {
+      super(mc);
+   }
+
+   protected WrappedStatement wrapStatement(Statement statement)
+   {
+      return new WrappedStatementJDK5(this, statement);
+   }
+
+   protected WrappedPreparedStatement wrapPreparedStatement(PreparedStatement statement)
+   {
+      return new WrappedPreparedStatementJDK5(this, statement);
+   }
+
+   protected WrappedCallableStatement wrapCallableStatement(CallableStatement statement)
+   {
+      return new WrappedCallableStatementJDK5(this, statement);
+   }
+}

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedPreparedStatementJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedPreparedStatementJDK5.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedPreparedStatementJDK5.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.jboss.resource.adapter.jdbc.WrappedPreparedStatement;
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+
+/**
+ * WrappedPreparedStatementJDK5.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedPreparedStatementJDK5 extends WrappedPreparedStatement
+{
+   public WrappedPreparedStatementJDK5(WrappedConnectionJDK5 lc, PreparedStatement s)
+   {
+      super(lc, s);
+   }
+   
+   protected WrappedResultSet wrapResultSet(ResultSet resultSet)
+   {
+      return new WrappedResultSetJDK5(this, resultSet);
+   }
+}

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedResultSetJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedResultSetJDK5.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedResultSetJDK5.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.ResultSet;
+
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+import org.jboss.resource.adapter.jdbc.WrappedStatement;
+
+/**
+ * WrappedResultSetJDK5.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedResultSetJDK5 extends WrappedResultSet
+{
+   public WrappedResultSetJDK5(WrappedStatement statement, ResultSet resultSet)
+   {
+      super(statement, resultSet);
+   }
+}

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedStatementJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedStatementJDK5.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedStatementJDK5.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.ResultSet;
+import java.sql.Statement;
+
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+import org.jboss.resource.adapter.jdbc.WrappedStatement;
+
+/**
+ * WrappedStatementJDK5.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedStatementJDK5 extends WrappedStatement
+{
+   public WrappedStatementJDK5(WrappedConnectionJDK5 lc, Statement s)
+   {
+      super(lc, s);
+   }
+   
+   protected WrappedResultSet wrapResultSet(ResultSet resultSet)
+   {
+      return new WrappedResultSetJDK5(this, resultSet);
+   }
+}

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedCallableStatementJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedCallableStatementJDK6.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedCallableStatementJDK6.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,313 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.sql.Blob;
+import java.sql.CallableStatement;
+import java.sql.Clob;
+import java.sql.NClob;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+
+import org.jboss.resource.adapter.jdbc.CachedCallableStatement;
+
+/**
+ * CachedCallableStatementJDK6.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class CachedCallableStatementJDK6 extends CachedCallableStatement
+{
+   public CachedCallableStatementJDK6(CallableStatement cs) throws SQLException
+   {
+      super(cs);
+   }
+
+   public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException
+   {
+      getWrappedObject().setAsciiStream(parameterIndex, x, length);
+   }
+
+   public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
+   {
+      getWrappedObject().setAsciiStream(parameterIndex, x);
+   }
+
+   public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException
+   {
+      getWrappedObject().setBinaryStream(parameterIndex, x, length);
+   }
+
+   public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
+   {
+      getWrappedObject().setBinaryStream(parameterIndex, x);
+   }
+
+   public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException
+   {
+      getWrappedObject().setBlob(parameterIndex, inputStream, length);
+   }
+
+   public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException
+   {
+      getWrappedObject().setBlob(parameterIndex, inputStream);
+   }
+
+   public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException
+   {
+      getWrappedObject().setCharacterStream(parameterIndex, reader, length);
+   }
+
+   public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
+   {
+      getWrappedObject().setCharacterStream(parameterIndex, reader);
+   }
+
+   public void setClob(int parameterIndex, Reader reader, long length) throws SQLException
+   {
+      getWrappedObject().setClob(parameterIndex, reader, length);
+   }
+
+   public void setClob(int parameterIndex, Reader reader) throws SQLException
+   {
+      getWrappedObject().setClob(parameterIndex, reader);
+   }
+
+   public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException
+   {
+      getWrappedObject().setNCharacterStream(parameterIndex, value, length);
+   }
+
+   public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException
+   {
+      getWrappedObject().setNCharacterStream(parameterIndex, value);
+   }
+
+   public void setNClob(int parameterIndex, NClob value) throws SQLException
+   {
+      getWrappedObject().setNClob(parameterIndex, value);
+   }
+
+   public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException
+   {
+      getWrappedObject().setNClob(parameterIndex, reader, length);
+   }
+
+   public void setNClob(int parameterIndex, Reader reader) throws SQLException
+   {
+      getWrappedObject().setNClob(parameterIndex, reader);
+   }
+
+   public void setNString(int parameterIndex, String value) throws SQLException
+   {
+      getWrappedObject().setNString(parameterIndex, value);
+   }
+
+   public void setRowId(int parameterIndex, RowId x) throws SQLException
+   {
+      getWrappedObject().setRowId(parameterIndex, x);
+   }
+
+   public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
+   {
+      getWrappedObject().setSQLXML(parameterIndex, xmlObject);
+   }
+
+   public boolean isClosed() throws SQLException
+   {
+      return getWrappedObject().isClosed();
+   }
+
+   public boolean isPoolable() throws SQLException
+   {
+      return getWrappedObject().isPoolable();
+   }
+
+   public void setPoolable(boolean poolable) throws SQLException
+   {
+      getWrappedObject().setPoolable(poolable);
+   }
+
+   public Reader getCharacterStream(int parameterIndex) throws SQLException
+   {
+      return getWrappedObject().getCharacterStream(parameterIndex);
+   }
+
+   public Reader getCharacterStream(String parameterName) throws SQLException
+   {
+      return getWrappedObject().getCharacterStream(parameterName);
+   }
+
+   public Reader getNCharacterStream(int parameterIndex) throws SQLException
+   {
+      return getWrappedObject().getNCharacterStream(parameterIndex);
+   }
+
+   public Reader getNCharacterStream(String parameterName) throws SQLException
+   {
+      return getWrappedObject().getNCharacterStream(parameterName);
+   }
+
+   public NClob getNClob(int parameterIndex) throws SQLException
+   {
+      return getWrappedObject().getNClob(parameterIndex);
+   }
+
+   public NClob getNClob(String parameterName) throws SQLException
+   {
+      return getWrappedObject().getNClob(parameterName);
+   }
+
+   public String getNString(int parameterIndex) throws SQLException
+   {
+      return getWrappedObject().getNString(parameterIndex);
+   }
+
+   public String getNString(String parameterName) throws SQLException
+   {
+      return getWrappedObject().getNString(parameterName);
+   }
+
+   public RowId getRowId(int parameterIndex) throws SQLException
+   {
+      return getWrappedObject().getRowId(parameterIndex);
+   }
+
+   public RowId getRowId(String parameterName) throws SQLException
+   {
+      return getWrappedObject().getRowId(parameterName);
+   }
+
+   public SQLXML getSQLXML(int parameterIndex) throws SQLException
+   {
+      return getWrappedObject().getSQLXML(parameterIndex);
+   }
+
+   public SQLXML getSQLXML(String parameterName) throws SQLException
+   {
+      return getWrappedObject().getSQLXML(parameterName);
+   }
+
+   public void setAsciiStream(String parameterName, InputStream x, long length) throws SQLException
+   {
+      getWrappedObject().setAsciiStream(parameterName, x, length);
+   }
+
+   public void setAsciiStream(String parameterName, InputStream x) throws SQLException
+   {
+      getWrappedObject().setAsciiStream(parameterName, x);
+   }
+
+   public void setBinaryStream(String parameterName, InputStream x, long length) throws SQLException
+   {
+      getWrappedObject().setBinaryStream(parameterName, x, length);
+   }
+
+   public void setBinaryStream(String parameterName, InputStream x) throws SQLException
+   {
+      getWrappedObject().setBinaryStream(parameterName, x);
+   }
+
+   public void setBlob(String parameterName, Blob x) throws SQLException
+   {
+      getWrappedObject().setBlob(parameterName, x);
+   }
+
+   public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException
+   {
+      getWrappedObject().setBlob(parameterName, inputStream, length);
+   }
+
+   public void setBlob(String parameterName, InputStream inputStream) throws SQLException
+   {
+      getWrappedObject().setBlob(parameterName, inputStream);
+   }
+
+   public void setCharacterStream(String parameterName, Reader reader, long length) throws SQLException
+   {
+      getWrappedObject().setCharacterStream(parameterName, reader, length);
+   }
+
+   public void setCharacterStream(String parameterName, Reader reader) throws SQLException
+   {
+      getWrappedObject().setCharacterStream(parameterName, reader);
+   }
+
+   public void setClob(String parameterName, Clob x) throws SQLException
+   {
+      getWrappedObject().setClob(parameterName, x);
+   }
+
+   public void setClob(String parameterName, Reader reader, long length) throws SQLException
+   {
+      getWrappedObject().setClob(parameterName, reader, length);
+   }
+
+   public void setClob(String parameterName, Reader reader) throws SQLException
+   {
+      getWrappedObject().setClob(parameterName, reader);
+   }
+
+   public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException
+   {
+      getWrappedObject().setNCharacterStream(parameterName, value, length);
+   }
+
+   public void setNCharacterStream(String parameterName, Reader value) throws SQLException
+   {
+      getWrappedObject().setNCharacterStream(parameterName, value);
+   }
+
+   public void setNClob(String parameterName, NClob value) throws SQLException
+   {
+      getWrappedObject().setNClob(parameterName, value);
+   }
+
+   public void setNClob(String parameterName, Reader reader, long length) throws SQLException
+   {
+      getWrappedObject().setNClob(parameterName, reader, length);
+   }
+
+   public void setNClob(String parameterName, Reader reader) throws SQLException
+   {
+      getWrappedObject().setNClob(parameterName, reader);
+   }
+
+   public void setNString(String parameterName, String value) throws SQLException
+   {
+      getWrappedObject().setNString(parameterName, value);
+   }
+
+   public void setRowId(String parameterName, RowId x) throws SQLException
+   {
+      getWrappedObject().setRowId(parameterName, x);
+   }
+
+   public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException
+   {
+      getWrappedObject().setSQLXML(parameterName, xmlObject);
+   }
+}

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedPreparedStatementJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedPreparedStatementJDK6.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedPreparedStatementJDK6.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,151 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+
+import org.jboss.resource.adapter.jdbc.CachedPreparedStatement;
+
+/**
+ * CachedPreparedStatementJDK5.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class CachedPreparedStatementJDK6 extends CachedPreparedStatement
+{
+   public CachedPreparedStatementJDK6(PreparedStatement ps) throws SQLException
+   {
+      super(ps);
+   }
+
+   public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException
+   {
+      getWrappedObject().setAsciiStream(parameterIndex, x, length);
+   }
+
+   public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
+   {
+      getWrappedObject().setAsciiStream(parameterIndex, x);
+   }
+
+   public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException
+   {
+      getWrappedObject().setBinaryStream(parameterIndex, x, length);
+   }
+
+   public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
+   {
+      getWrappedObject().setBinaryStream(parameterIndex, x);
+   }
+
+   public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException
+   {
+      getWrappedObject().setBlob(parameterIndex, inputStream, length);
+   }
+
+   public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException
+   {
+      getWrappedObject().setBlob(parameterIndex, inputStream);
+   }
+
+   public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException
+   {
+      getWrappedObject().setCharacterStream(parameterIndex, reader, length);
+   }
+
+   public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
+   {
+      getWrappedObject().setCharacterStream(parameterIndex, reader);
+   }
+
+   public void setClob(int parameterIndex, Reader reader, long length) throws SQLException
+   {
+      getWrappedObject().setClob(parameterIndex, reader, length);
+   }
+
+   public void setClob(int parameterIndex, Reader reader) throws SQLException
+   {
+      getWrappedObject().setClob(parameterIndex, reader);
+   }
+
+   public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException
+   {
+      getWrappedObject().setNCharacterStream(parameterIndex, value, length);
+   }
+
+   public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException
+   {
+      getWrappedObject().setNCharacterStream(parameterIndex, value);
+   }
+
+   public void setNClob(int parameterIndex, NClob value) throws SQLException
+   {
+      getWrappedObject().setNClob(parameterIndex, value);
+   }
+
+   public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException
+   {
+      getWrappedObject().setNClob(parameterIndex, reader, length);
+   }
+
+   public void setNClob(int parameterIndex, Reader reader) throws SQLException
+   {
+      getWrappedObject().setNClob(parameterIndex, reader);
+   }
+
+   public void setNString(int parameterIndex, String value) throws SQLException
+   {
+      getWrappedObject().setNString(parameterIndex, value);
+   }
+
+   public void setRowId(int parameterIndex, RowId x) throws SQLException
+   {
+      getWrappedObject().setRowId(parameterIndex, x);
+   }
+
+   public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
+   {
+      getWrappedObject().setSQLXML(parameterIndex, xmlObject);
+   }
+
+   public boolean isClosed() throws SQLException
+   {
+      return getWrappedObject().isClosed();
+   }
+
+   public boolean isPoolable() throws SQLException
+   {
+      return getWrappedObject().isPoolable();
+   }
+
+   public void setPoolable(boolean poolable) throws SQLException
+   {
+      getWrappedObject().setPoolable(poolable);
+   }
+}

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedCallableStatementJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedCallableStatementJDK6.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedCallableStatementJDK6.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,748 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.sql.Blob;
+import java.sql.CallableStatement;
+import java.sql.Clob;
+import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+
+import org.jboss.resource.adapter.jdbc.WrappedCallableStatement;
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+
+/**
+ * WrappedCallableStatementJDK6.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedCallableStatementJDK6 extends WrappedCallableStatement
+{
+   public WrappedCallableStatementJDK6(WrappedConnectionJDK6 lc, CallableStatement s)
+   {
+      super(lc, s);
+   }
+   
+   protected WrappedResultSet wrapResultSet(ResultSet resultSet)
+   {
+      return new WrappedResultSetJDK6(this, resultSet);
+   }
+
+   public boolean isClosed() throws SQLException
+   {
+      try
+      {
+         PreparedStatement wrapped = getWrappedObject();
+         if (wrapped == null)
+            return true;
+         return wrapped.isClosed();
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public boolean isPoolable() throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         return statement.isPoolable();
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setPoolable(boolean poolable) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setPoolable(poolable);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setAsciiStream(parameterIndex, x, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setAsciiStream(parameterIndex, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setBinaryStream(parameterIndex, x, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setBinaryStream(parameterIndex, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setBlob(parameterIndex, inputStream, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setBlob(parameterIndex, inputStream);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setCharacterStream(parameterIndex, reader, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setCharacterStream(parameterIndex, reader);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setClob(int parameterIndex, Reader reader, long length) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setClob(parameterIndex, reader, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setClob(int parameterIndex, Reader reader) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setClob(parameterIndex, reader);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNCharacterStream(parameterIndex, value, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNCharacterStream(parameterIndex, value);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNClob(int parameterIndex, NClob value) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNClob(parameterIndex, value);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNClob(parameterIndex, reader, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNClob(int parameterIndex, Reader reader) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNClob(parameterIndex, reader);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNString(int parameterIndex, String value) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNString(parameterIndex, value);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setRowId(int parameterIndex, RowId x) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setRowId(parameterIndex, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setSQLXML(parameterIndex, xmlObject);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public Reader getCharacterStream(int parameterIndex) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         return statement.getCharacterStream(parameterIndex);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public Reader getCharacterStream(String parameterName) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         return statement.getCharacterStream(parameterName);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public Reader getNCharacterStream(int parameterIndex) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         return statement.getNCharacterStream(parameterIndex);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public Reader getNCharacterStream(String parameterName) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         return statement.getCharacterStream(parameterName);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public NClob getNClob(int parameterIndex) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         return statement.getNClob(parameterIndex);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public NClob getNClob(String parameterName) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         return statement.getNClob(parameterName);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public String getNString(int parameterIndex) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         return statement.getNString(parameterIndex);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public String getNString(String parameterName) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         return statement.getNString(parameterName);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public RowId getRowId(int parameterIndex) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         return statement.getRowId(parameterIndex);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public RowId getRowId(String parameterName) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         return statement.getRowId(parameterName);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public SQLXML getSQLXML(int parameterIndex) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         return statement.getSQLXML(parameterIndex);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public SQLXML getSQLXML(String parameterName) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         return statement.getSQLXML(parameterName);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setAsciiStream(String parameterName, InputStream x, long length) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setAsciiStream(parameterName, x, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setAsciiStream(String parameterName, InputStream x) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setAsciiStream(parameterName, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setBinaryStream(String parameterName, InputStream x, long length) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setBinaryStream(parameterName, x, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setBinaryStream(String parameterName, InputStream x) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setBinaryStream(parameterName, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setBlob(String parameterName, Blob x) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setBlob(parameterName, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setBlob(parameterName, inputStream, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setBlob(String parameterName, InputStream inputStream) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setBlob(parameterName, inputStream);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setCharacterStream(String parameterName, Reader reader, long length) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setCharacterStream(parameterName, reader, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setCharacterStream(String parameterName, Reader reader) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setCharacterStream(parameterName, reader);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setClob(String parameterName, Clob x) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setClob(parameterName, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setClob(String parameterName, Reader reader, long length) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setClob(parameterName, reader, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setClob(String parameterName, Reader reader) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setClob(parameterName, reader);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNCharacterStream(parameterName, value, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNCharacterStream(String parameterName, Reader value) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNCharacterStream(parameterName, value);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNClob(String parameterName, NClob value) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNClob(parameterName, value);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNClob(String parameterName, Reader reader, long length) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNClob(parameterName, reader, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNClob(String parameterName, Reader reader) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNClob(parameterName, reader);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNString(String parameterName, String value) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNString(parameterName, value);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setRowId(String parameterName, RowId x) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setRowId(parameterName, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException
+   {
+      CallableStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setSQLXML(parameterName, xmlObject);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+}

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionFactoryJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionFactoryJDK6.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionFactoryJDK6.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,56 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+import org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection;
+import org.jboss.resource.adapter.jdbc.CachedCallableStatement;
+import org.jboss.resource.adapter.jdbc.CachedPreparedStatement;
+import org.jboss.resource.adapter.jdbc.WrappedConnection;
+import org.jboss.resource.adapter.jdbc.WrappedConnectionFactory;
+
+/**
+ * WrappedConnectionFactoryJDK6
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedConnectionFactoryJDK6 implements WrappedConnectionFactory
+{
+   public WrappedConnection createWrappedConnection(BaseWrapperManagedConnection mc)
+   {
+      return new WrappedConnectionJDK6(mc);
+   }
+
+   public CachedPreparedStatement createCachedPreparedStatement(PreparedStatement ps) throws SQLException
+   {
+      return new CachedPreparedStatementJDK6(ps);
+   }
+
+   public CachedCallableStatement createCachedCallableStatement(CallableStatement cs) throws SQLException
+   {
+      return new CachedCallableStatementJDK6(cs);
+   }
+}

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionJDK6.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionJDK6.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,246 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.CallableStatement;
+import java.sql.Clob;
+import java.sql.Connection;
+import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.SQLClientInfoException;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+import java.sql.Statement;
+import java.sql.Struct;
+import java.util.Properties;
+
+import org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection;
+import org.jboss.resource.adapter.jdbc.WrappedCallableStatement;
+import org.jboss.resource.adapter.jdbc.WrappedConnection;
+import org.jboss.resource.adapter.jdbc.WrappedPreparedStatement;
+import org.jboss.resource.adapter.jdbc.WrappedStatement;
+
+/**
+ * WrappedConnectionJDK6.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at SuppressWarnings("unchecked")
+public class WrappedConnectionJDK6 extends WrappedConnection
+{
+   /**
+    * Create a new WrappedConnectionJDK6.
+    * 
+    * @param mc the managed connection
+    */
+   public WrappedConnectionJDK6(BaseWrapperManagedConnection mc)
+   {
+      super(mc);
+   }
+
+   protected WrappedStatement wrapStatement(Statement statement)
+   {
+      return new WrappedStatementJDK6(this, statement);
+   }
+
+   protected WrappedPreparedStatement wrapPreparedStatement(PreparedStatement statement)
+   {
+      return new WrappedPreparedStatementJDK6(this, statement);
+   }
+
+   protected WrappedCallableStatement wrapCallableStatement(CallableStatement statement)
+   {
+      return new WrappedCallableStatementJDK6(this, statement);
+   }
+
+   public Array createArrayOf(String typeName, Object[] elements) throws SQLException
+   {
+      Connection c = getUnderlyingConnection();
+      try
+      {
+         return c.createArrayOf(typeName, elements);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public Blob createBlob() throws SQLException
+   {
+      Connection c = getUnderlyingConnection();
+      try
+      {
+         return c.createBlob();
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public Clob createClob() throws SQLException
+   {
+      Connection c = getUnderlyingConnection();
+      try
+      {
+         return c.createClob();
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public NClob createNClob() throws SQLException
+   {
+      Connection c = getUnderlyingConnection();
+      try
+      {
+         return c.createNClob();
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public SQLXML createSQLXML() throws SQLException
+   {
+      Connection c = getUnderlyingConnection();
+      try
+      {
+         return c.createSQLXML();
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public Struct createStruct(String typeName, Object[] attributes) throws SQLException
+   {
+      Connection c = getUnderlyingConnection();
+      try
+      {
+         return c.createStruct(typeName, attributes);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public Properties getClientInfo() throws SQLException
+   {
+      Connection c = getUnderlyingConnection();
+      try
+      {
+         return c.getClientInfo();
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public String getClientInfo(String name) throws SQLException
+   {
+      Connection c = getUnderlyingConnection();
+      try
+      {
+         return c.getClientInfo(name);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public boolean isValid(int timeout) throws SQLException
+   {
+      Connection c = getUnderlyingConnection();
+      try
+      {
+         return c.isValid(timeout);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setClientInfo(Properties properties) throws SQLClientInfoException
+   {
+      try
+      {
+         Connection c = getUnderlyingConnection();
+         try
+         {
+            c.setClientInfo(properties);
+         }
+         catch (Throwable t)
+         {
+            throw checkException(t);
+         }
+      }
+      catch (SQLClientInfoException e)
+      {
+         throw e;
+      }
+      catch (SQLException e)
+      {
+         SQLClientInfoException t = new SQLClientInfoException();
+         t.initCause(e);
+         throw t;
+      }
+   }
+
+   public void setClientInfo(String name, String value) throws SQLClientInfoException
+   {
+      try
+      {
+         Connection c = getUnderlyingConnection();
+         try
+         {
+            c.setClientInfo(name, value);
+         }
+         catch (Throwable t)
+         {
+            throw checkException(t);
+         }
+      }
+      catch (SQLClientInfoException e)
+      {
+         throw e;
+      }
+      catch (SQLException e)
+      {
+         SQLClientInfoException t = new SQLClientInfoException();
+         t.initCause(e);
+         throw t;
+      }
+   }
+}

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedPreparedStatementJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedPreparedStatementJDK6.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedPreparedStatementJDK6.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,328 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+
+import org.jboss.resource.adapter.jdbc.WrappedPreparedStatement;
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+
+/**
+ * WrappedPreparedStatementJDK6.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedPreparedStatementJDK6 extends WrappedPreparedStatement
+{
+   public WrappedPreparedStatementJDK6(WrappedConnectionJDK6 lc, PreparedStatement s)
+   {
+      super(lc, s);
+   }
+   
+   protected WrappedResultSet wrapResultSet(ResultSet resultSet)
+   {
+      return new WrappedResultSetJDK6(this, resultSet);
+   }
+
+   public boolean isClosed() throws SQLException
+   {
+      try
+      {
+         PreparedStatement wrapped = getWrappedObject();
+         if (wrapped == null)
+            return true;
+         return wrapped.isClosed();
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public boolean isPoolable() throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         return statement.isPoolable();
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setPoolable(boolean poolable) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setPoolable(poolable);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setAsciiStream(parameterIndex, x, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setAsciiStream(parameterIndex, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setBinaryStream(parameterIndex, x, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setBinaryStream(parameterIndex, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setBlob(parameterIndex, inputStream, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setBlob(parameterIndex, inputStream);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setCharacterStream(parameterIndex, reader, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setCharacterStream(parameterIndex, reader);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setClob(int parameterIndex, Reader reader, long length) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setClob(parameterIndex, reader, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setClob(int parameterIndex, Reader reader) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setClob(parameterIndex, reader);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNCharacterStream(parameterIndex, value, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNCharacterStream(parameterIndex, value);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNClob(int parameterIndex, NClob value) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNClob(parameterIndex, value);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNClob(parameterIndex, reader, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNClob(int parameterIndex, Reader reader) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNClob(parameterIndex, reader);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setNString(int parameterIndex, String value) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setNString(parameterIndex, value);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setRowId(int parameterIndex, RowId x) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setRowId(parameterIndex, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
+   {
+      PreparedStatement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setSQLXML(parameterIndex, xmlObject);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+}

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedResultSetJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedResultSetJDK6.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedResultSetJDK6.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,673 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.sql.NClob;
+import java.sql.ResultSet;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+import org.jboss.resource.adapter.jdbc.WrappedStatement;
+
+/**
+ * WrappedResultSetJDK6.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedResultSetJDK6 extends WrappedResultSet
+{
+   public WrappedResultSetJDK6(WrappedStatement statement, ResultSet resultSet)
+   {
+      super(statement, resultSet);
+   }
+
+   public int getHoldability() throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         return resultSet.getHoldability();
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public Reader getNCharacterStream(int columnIndex) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         return resultSet.getNCharacterStream(columnIndex);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public Reader getNCharacterStream(String columnLabel) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         return resultSet.getNCharacterStream(columnLabel);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public NClob getNClob(int columnIndex) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         return resultSet.getNClob(columnIndex);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public NClob getNClob(String columnLabel) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         return resultSet.getNClob(columnLabel);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public String getNString(int columnIndex) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         return resultSet.getNString(columnIndex);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public String getNString(String columnLabel) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         return resultSet.getNString(columnLabel);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public RowId getRowId(int columnIndex) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         return resultSet.getRowId(columnIndex);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public RowId getRowId(String columnLabel) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         return resultSet.getRowId(columnLabel);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public SQLXML getSQLXML(int columnIndex) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         return resultSet.getSQLXML(columnIndex);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public SQLXML getSQLXML(String columnLabel) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         return resultSet.getSQLXML(columnLabel);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public boolean isClosed() throws SQLException
+   {
+      ResultSet resultSet = getWrappedObject();
+      if (resultSet == null)
+         return true;
+      try
+      {
+         return resultSet.isClosed();
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateAsciiStream(columnIndex, x, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateAsciiStream(columnIndex, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateAsciiStream(columnLabel, x, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateAsciiStream(columnLabel, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateBinaryStream(columnIndex, x, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateBinaryStream(columnIndex, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateBinaryStream(columnLabel, x, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateBinaryStream(columnLabel, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateBlob(columnIndex, inputStream, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateBlob(columnIndex, inputStream);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateBlob(columnLabel, inputStream, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateBlob(columnLabel, inputStream);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateCharacterStream(columnIndex, x, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateCharacterStream(int columnIndex, Reader x) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateCharacterStream(columnIndex, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateCharacterStream(columnLabel, reader, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateCharacterStream(columnLabel, reader);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateClob(int columnIndex, Reader reader, long length) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateClob(columnIndex, reader, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateClob(int columnIndex, Reader reader) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateClob(columnIndex, reader);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateClob(String columnLabel, Reader reader, long length) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateClob(columnLabel, reader, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateClob(String columnLabel, Reader reader) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateClob(columnLabel, reader);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateNCharacterStream(columnIndex, x, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateNCharacterStream(columnIndex, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateNCharacterStream(columnLabel, reader, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateNCharacterStream(columnLabel, reader);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateNClob(int columnIndex, NClob clob) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateNClob(columnIndex, clob);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateNClob(columnIndex, reader, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateNClob(int columnIndex, Reader reader) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateNClob(columnIndex, reader);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateNClob(String columnLabel, NClob clob) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateNClob(columnLabel, clob);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateNClob(columnLabel, reader, length);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateNClob(String columnLabel, Reader reader) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateNClob(columnLabel, reader);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateNString(int columnIndex, String string) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateNString(columnIndex, string);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateNString(String columnLabel, String string) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateNString(columnLabel, string);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateRowId(int columnIndex, RowId x) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateRowId(columnIndex, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateRowId(String columnLabel, RowId x) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateRowId(columnLabel, x);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateSQLXML(columnIndex, xmlObject);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException
+   {
+      ResultSet resultSet = getUnderlyingResultSet();
+      try
+      {
+         resultSet.updateSQLXML(columnLabel, xmlObject);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+}

Added: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedStatementJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedStatementJDK6.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedStatementJDK6.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -0,0 +1,89 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+import org.jboss.resource.adapter.jdbc.WrappedStatement;
+
+/**
+ * WrappedStatementJDK6.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedStatementJDK6 extends WrappedStatement
+{
+   public WrappedStatementJDK6(WrappedConnectionJDK6 lc, Statement s)
+   {
+      super(lc, s);
+   }
+
+   protected WrappedResultSet wrapResultSet(ResultSet resultSet)
+   {
+      return new WrappedResultSetJDK6(this, resultSet);
+   }
+
+   public boolean isClosed() throws SQLException
+   {
+      try
+      {
+         Statement wrapped = getWrappedObject();
+         if (wrapped == null)
+            return true;
+         return wrapped.isClosed();
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public boolean isPoolable() throws SQLException
+   {
+      Statement statement = getUnderlyingStatement();
+      try
+      {
+         return statement.isPoolable();
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+
+   public void setPoolable(boolean poolable) throws SQLException
+   {
+      Statement statement = getUnderlyingStatement();
+      try
+      {
+         statement.setPoolable(poolable);
+      }
+      catch (Throwable t)
+      {
+         throw checkException(t);
+      }
+   }
+}

Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/remote/SerializableParameterMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/remote/SerializableParameterMetaData.java	2007-11-29 16:18:57 UTC (rev 67612)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/remote/SerializableParameterMetaData.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -25,11 +25,13 @@
 import java.sql.ParameterMetaData;
 import java.sql.SQLException;
 
+import org.jboss.resource.adapter.jdbc.JBossWrapper;
+
 /**
  * @author <a href="mailto:telrod at e2technologies.net">Tom Elrod</a>
  * @version $Revision$
  */
-public class SerializableParameterMetaData implements ParameterMetaData, Serializable
+public class SerializableParameterMetaData extends JBossWrapper implements ParameterMetaData, Serializable
 {
    /** @since 1.1 */
    static final long serialVersionUID = -6601828413479683906L;

Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/remote/SerializableResultSetMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/remote/SerializableResultSetMetaData.java	2007-11-29 16:18:57 UTC (rev 67612)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/remote/SerializableResultSetMetaData.java	2007-11-29 16:25:51 UTC (rev 67613)
@@ -25,12 +25,14 @@
 import java.sql.SQLException;
 import java.io.Serializable;
 
+import org.jboss.resource.adapter.jdbc.JBossWrapper;
+
 /** A wrapper to marshall ResultSetMetaData remotely.
  *
  * @author Scott.Stark at jboss.org
  * @version $Revision$
  */
-public class   SerializableResultSetMetaData
+public class   SerializableResultSetMetaData extends JBossWrapper
    implements ResultSetMetaData, Serializable
 {
    /** @since 1.3 */




More information about the jboss-cvs-commits mailing list