db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r377105 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/batch/PreparedStatementInvocationHandler.java
Date Sun, 12 Feb 2006 01:44:25 GMT
Author: arminw
Date: Sat Feb 11 17:44:24 2006
New Revision: 377105

URL: http://svn.apache.org/viewcvs?rev=377105&view=rev
Log:
fix reflection issue

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/batch/PreparedStatementInvocationHandler.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/batch/PreparedStatementInvocationHandler.java
URL: http://svn.apache.org/viewcvs/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/batch/PreparedStatementInvocationHandler.java?rev=377105&r1=377104&r2=377105&view=diff
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/batch/PreparedStatementInvocationHandler.java
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/batch/PreparedStatementInvocationHandler.java
Sat Feb 11 17:44:24 2006
@@ -16,21 +16,19 @@
  */
 
 
-import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
-import org.apache.ojb.broker.platforms.PlatformFactory;
-import org.apache.ojb.broker.platforms.PlatformException;
-import org.apache.ojb.broker.platforms.Platform;
-
-import java.lang.reflect.Method;
+import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 import java.math.BigDecimal;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.util.ArrayList;
 
-//#ifdef JDK13
-import java.lang.reflect.InvocationHandler;
+import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
+import org.apache.ojb.broker.platforms.Platform;
+import org.apache.ojb.broker.platforms.PlatformException;
+import org.apache.ojb.broker.platforms.PlatformFactory;
 //#else
 /*
 import com.develop.java.lang.reflect.InvocationHandler;
@@ -38,7 +36,7 @@
 //#endif
 
 /**
- * The implementation of {@link java.reflect.InvocationHandler} which is used
+ * The implementation of {@link java.lang.reflect.InvocationHandler} which is used
  * to create dynamic proxy which will implement {@link java.sql.PreparedStatement} and
  * {@link BatchPreparedStatement}.
  *
@@ -113,7 +111,7 @@
         }
         else if ( name.equals("doExecute") )
         {
-            doExecute((Connection) args[0]);
+            doExecute(_batchConn.getDelegate());
         }
         else if ( name.startsWith("set") )
         {
@@ -175,8 +173,6 @@
         }
         try
         {
-            Object[] args = new Object[1];
-
             for ( int i = 0; i < size; i++ )
             {
                 Method method = (Method) _methods.get(i);
@@ -191,8 +187,7 @@
                     }
                     else
                     {
-                        args[0] = _params.get(i);
-                        method.invoke(stmt, args);
+                        method.invoke(stmt, (Object[]) _params.get(i));
                     }
                 }
                 catch (IllegalArgumentException ex)



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message