From: Roman R. <rro...@us...> - 2005-05-17 08:12:11
|
Update of /cvsroot/firebird/client-java/src/main/org/firebirdsql/jdbc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14317/src/main/org/firebirdsql/jdbc Modified Files: AbstractConnection.java Log Message: removed synchronization on managed connection Index: AbstractConnection.java =================================================================== RCS file: /cvsroot/firebird/client-java/src/main/org/firebirdsql/jdbc/AbstractConnection.java,v retrieving revision 1.38 retrieving revision 1.39 diff -b -U3 -r1.38 -r1.39 --- AbstractConnection.java 15 May 2005 12:02:17 -0000 1.38 +++ AbstractConnection.java 17 May 2005 08:12:00 -0000 1.39 @@ -380,7 +380,6 @@ if (mc.autoCommit == autoCommit) return; - synchronized(mc) { InternalTransactionCoordinator.AbstractTransactionCoordinator coordinator; if (autoCommit) coordinator = new InternalTransactionCoordinator.AutoCommitCoordinator(this, localTransaction); @@ -390,12 +389,10 @@ txCoordinator.setCoordinator(coordinator); mc.setAutoCommit(autoCommit); } - } public void setManagedEnvironment(boolean managedConnection) throws SQLException { checkValidity(); - synchronized(mc) { InternalTransactionCoordinator.AbstractTransactionCoordinator coordinator; if (managedConnection) { @@ -408,7 +405,6 @@ txCoordinator.setCoordinator(coordinator); } - } /** * Gets the current auto-commit state. @@ -490,7 +486,6 @@ //leave managed transactions alone, they are normally //committed after the Connection handle is closed. - synchronized(mc) { if (!getAutoCommit() && localTransaction.inTransaction()) { //autocommit is always true for managed tx. try { @@ -498,7 +493,6 @@ } finally { setAutoCommit(true); } - } mc.close(this); } @@ -629,7 +623,6 @@ "Connection has being closed.", FBSQLException.SQL_STATE_CONNECTION_CLOSED); - synchronized(mc) { try { if (!getAutoCommit() && !mc.isManagedEnvironment()) @@ -641,7 +634,6 @@ throw new FBSQLException(re); } } - } /** * Gets this Connection's current transaction isolation level. |