svn commit: r489814 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/ConnectionManagerImpl.java

[email protected]
Newsgroups gmane.comp.jakarta.ojb.devel
Message-ID <[email protected]>
Author: arminw
Date: Fri Dec 22 17:18:28 2006
New Revision: 489814

URL: http://svn.apache.org/viewvc?view=rev&rev=489814
Log:
change Platform instance lookup, use new Platform methods

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

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/ConnectionManagerImpl.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/ConnectionManagerImpl.java?view=diff&rev=489814&r1=489813&r2=489814
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/ConnectionManagerImpl.java (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/ConnectionManagerImpl.java Fri Dec 22 17:18:28 2006
@@ -28,7 +28,6 @@
 import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
 import org.apache.ojb.broker.metadata.MetadataManager;
 import org.apache.ojb.broker.platforms.Platform;
-import org.apache.ojb.broker.platforms.PlatformFactory;
 import org.apache.ojb.broker.util.batch.BatchConnection;
 import org.apache.ojb.broker.util.logging.Logger;
 import org.apache.ojb.broker.util.logging.LoggerFactory;
@@ -59,7 +58,7 @@
         this.broker = (PersistenceBrokerInternal) broker;
         this.jcd = MetadataManager.getInstance().connectionRepository().getDescriptor(broker.getPBKey());
         this.connectionFactory = ConnectionFactoryFactory.getInstance().createConnectionFactory();
-        this.platform = PlatformFactory.getPlatformFor(jcd);
+        this.platform = jcd.getPlatform();
         /*
         by default batch mode is not enabled and after use of a PB
         instance, before instance was returned to pool, batch mode
@@ -173,7 +172,7 @@
             if (jcd.getUseAutoCommit() == JdbcConnectionDescriptor.AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE)
             {
                 if (log.isDebugEnabled()) log.debug("Try to change autoCommit state to 'false'");
-                platform.changeAutoCommitState(jcd, connection, false);
+                platform.changeAutoCommitState(connection, false);
             }
         }
         else
@@ -288,7 +287,7 @@
                 if (jcd.getUseAutoCommit() == JdbcConnectionDescriptor.AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE
                         && originalAutoCommitState && con != null && !con.isClosed())
                 {
-                    platform.changeAutoCommitState(jcd, con, true);
+                    platform.changeAutoCommitState(con, true);
                 }
             }
             else
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.