Package org.datanucleus.store.rdbms
Class ConnectionFactoryImpl.ManagedConnectionImpl
java.lang.Object
org.datanucleus.store.connection.AbstractManagedConnection
org.datanucleus.store.rdbms.ConnectionFactoryImpl.ManagedConnectionImpl
- All Implemented Interfaces:
org.datanucleus.store.connection.ManagedConnection
- Enclosing class:
ConnectionFactoryImpl
class ConnectionFactoryImpl.ManagedConnectionImpl
extends org.datanucleus.store.connection.AbstractManagedConnection
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) org.datanucleus.ExecutionContext
(package private) int
(package private) boolean
(package private) XAResource
Fields inherited from class org.datanucleus.store.connection.AbstractManagedConnection
closeOnRelease, commitOnRelease, conn, listeners, locked, useCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the connectionboolean
Create a connection to the resourceprivate Connection
Convenience accessor for the java.sql.Connection in use (if any).Obtain an XAResource which can be enlisted in a transactionvoid
release()
Release this connection.void
releaseSavepoint
(String name) void
rollbackToSavepoint
(String name) void
setSavepoint
(String name) Methods inherited from class org.datanucleus.store.connection.AbstractManagedConnection
addListener, closeOnRelease, commitOnRelease, incrementUseCount, isLocked, lock, removeListener, setCloseOnRelease, setCommitOnRelease, toString, transactionFlushed, transactionPreClose, unlock
-
Field Details
-
ec
org.datanucleus.ExecutionContext ec -
xaRes
XAResource xaRes -
isolation
int isolation -
needsCommitting
boolean needsCommitting -
savepoints
-
-
Constructor Details
-
ManagedConnectionImpl
ManagedConnectionImpl(org.datanucleus.ExecutionContext ec, Map options)
-
-
Method Details
-
release
public void release()Release this connection. Releasing this connection will allow this managed connection to be used one or more times inside the same transaction. If this managed connection is managed by a transaction manager, release is a no-op, otherwise the physical connection is closed- Specified by:
release
in interfaceorg.datanucleus.store.connection.ManagedConnection
- Overrides:
release
in classorg.datanucleus.store.connection.AbstractManagedConnection
-
getXAResource
Obtain an XAResource which can be enlisted in a transaction- Specified by:
getXAResource
in interfaceorg.datanucleus.store.connection.ManagedConnection
- Overrides:
getXAResource
in classorg.datanucleus.store.connection.AbstractManagedConnection
-
getConnection
Create a connection to the resource -
close
public void close()Close the connection- Specified by:
close
in interfaceorg.datanucleus.store.connection.ManagedConnection
- Overrides:
close
in classorg.datanucleus.store.connection.AbstractManagedConnection
-
getSqlConnection
Convenience accessor for the java.sql.Connection in use (if any).- Returns:
- SQL Connection
-
setSavepoint
- Specified by:
setSavepoint
in interfaceorg.datanucleus.store.connection.ManagedConnection
- Overrides:
setSavepoint
in classorg.datanucleus.store.connection.AbstractManagedConnection
-
releaseSavepoint
- Specified by:
releaseSavepoint
in interfaceorg.datanucleus.store.connection.ManagedConnection
- Overrides:
releaseSavepoint
in classorg.datanucleus.store.connection.AbstractManagedConnection
-
rollbackToSavepoint
- Specified by:
rollbackToSavepoint
in interfaceorg.datanucleus.store.connection.ManagedConnection
- Overrides:
rollbackToSavepoint
in classorg.datanucleus.store.connection.AbstractManagedConnection
-
closeAfterTransactionEnd
public boolean closeAfterTransactionEnd()- Specified by:
closeAfterTransactionEnd
in interfaceorg.datanucleus.store.connection.ManagedConnection
- Overrides:
closeAfterTransactionEnd
in classorg.datanucleus.store.connection.AbstractManagedConnection
-