db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r450010 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java
Date Tue, 26 Sep 2006 12:04:36 GMT
Author: arminw
Date: Tue Sep 26 05:04:36 2006
New Revision: 450010

URL: http://svn.apache.org/viewvc?view=rev&rev=450010
Log:
Stored Procedures fix: a argument descriptor can only be a OUT or a IN value, INOUT values
currently not supported
remove deprecated property 'eager-release'

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java?view=diff&rev=450010&r1=450009&r2=450010
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java
Tue Sep 26 05:04:36 2006
@@ -49,10 +49,8 @@
 import org.apache.ojb.broker.util.logging.LoggerFactory;
 
 /**
- * manages JDBC Connection and Statement resources.
+ * Manages JDBC Connection and Statement resources.
  *
- * @author Thomas Mahler
- * @author <a href="mailto:rburt3@mchsi.com">Randall Burt</a>
  * @version $Id$
  */
 public class StatementManager implements StatementManagerIF
@@ -62,23 +60,13 @@
     /** the associated broker */
     private final PersistenceBroker m_broker;
     private Platform m_platform;
-    /**
-     * Used when OJB run in JBoss
-     * TODO: Find a better solution to handle OJB within JBoss
-     * --> the JCA implementation should solve this problem
-     *
-     * arminw:
-     * Seems with JBoss 3.2.2 or higher the problem is gone, so we
-     * can deprecate this attribute sooner or later
-     */
-    private boolean m_eagerRelease;
+
     private ConnectionManagerIF m_conMan;
 
     public StatementManager(final PersistenceBroker pBroker)
     {
         this.m_broker = pBroker;
         this.m_conMan = m_broker.serviceConnectionManager();
-        m_eagerRelease = m_conMan.getConnectionDescriptor().getEagerRelease();
         m_platform = PlatformFactory.getPlatformFor(m_conMan.getConnectionDescriptor());
     }
 
@@ -94,17 +82,6 @@
             {
                 //log.info("## close: "+stmt);
                 stmt.close();
-
-                /*
-                *********************************************
-                special stuff for OJB within JBoss
-                ********************************************
-                */
-                if (m_eagerRelease)
-                {
-                    m_conMan.releaseConnection();
-                }
-
             }
             m_platform.afterStatementClose(stmt, rs);
         }
@@ -734,10 +711,14 @@
             ArgumentDescriptor arg = (ArgumentDescriptor) iterator.next();
             Object val = arg.getValue(obj);
             int jdbcType = arg.getJdbcType();
-            setObjectForStatement(stmt, valueSub + 1, val, jdbcType);
+
             if ((arg.getIsReturnedByProcedure()) && (callable != null))
             {
                 callable.registerOutParameter(valueSub + 1, jdbcType);
+            }
+            else
+            {
+                setObjectForStatement(stmt, valueSub + 1, val, jdbcType);
             }
             valueSub++;
         }



---------------------------------------------------------------------
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