Skip to content

Commit 5b75932

Browse files
committed
Changed to expose less Jaybird internals as suggested by Mark.
1 parent 6fabcae commit 5b75932

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/fbjava/src/main/java/org/firebirdsql/fbjava/impl/InternalFBConnection.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.firebirdsql.gds.ng.jna.JnaTransaction;
2626
import org.firebirdsql.jca.FBManagedConnection;
2727
import org.firebirdsql.jdbc.FBConnection;
28-
import org.firebirdsql.jdbc.InternalTransactionCoordinator;
2928
import org.firebirdsql.jna.fbclient.ISC_STATUS;
3029

3130
import com.sun.jna.ptr.IntByReference;
@@ -37,10 +36,6 @@ public InternalFBConnection(FBManagedConnection mc) throws SQLException
3736
{
3837
super(mc);
3938

40-
// for autocommit off
41-
txCoordinator.setCoordinator(new InternalTransactionCoordinator.LocalTransactionCoordinator(
42-
this, getLocalTransaction()));
43-
4439
InternalContext internalContext = InternalContext.get();
4540
IntByReference transactionHandle = new IntByReference();
4641
ISC_STATUS[] statusVector = new ISC_STATUS[20];
@@ -60,9 +55,11 @@ protected void finalize()
6055
}
6156

6257
@Override
63-
public void setManagedEnvironment(boolean managedConnection)
58+
public void setManagedEnvironment(boolean managedConnection) throws SQLException
6459
{
6560
// for autocommit off
61+
checkValidity();
62+
setTransactionCoordinator(managedConnection, false);
6663
}
6764

6865
@Override

0 commit comments

Comments
 (0)