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) XAResourceFields inherited from class org.datanucleus.store.connection.AbstractManagedConnection
closeOnRelease, commitOnRelease, conn, listeners, locked, useCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the connectionbooleanCreate a connection to the resourceprivate ConnectionConvenience accessor for the java.sql.Connection in use (if any).Obtain an XAResource which can be enlisted in a transactionvoidrelease()Release this connection.voidreleaseSavepoint(String name) voidrollbackToSavepoint(String name) voidsetSavepoint(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:
releasein interfaceorg.datanucleus.store.connection.ManagedConnection- Overrides:
releasein classorg.datanucleus.store.connection.AbstractManagedConnection
-
getXAResource
Obtain an XAResource which can be enlisted in a transaction- Specified by:
getXAResourcein interfaceorg.datanucleus.store.connection.ManagedConnection- Overrides:
getXAResourcein classorg.datanucleus.store.connection.AbstractManagedConnection
-
getConnection
Create a connection to the resource -
close
public void close()Close the connection- Specified by:
closein interfaceorg.datanucleus.store.connection.ManagedConnection- Overrides:
closein classorg.datanucleus.store.connection.AbstractManagedConnection
-
getSqlConnection
Convenience accessor for the java.sql.Connection in use (if any).- Returns:
- SQL Connection
-
setSavepoint
- Specified by:
setSavepointin interfaceorg.datanucleus.store.connection.ManagedConnection- Overrides:
setSavepointin classorg.datanucleus.store.connection.AbstractManagedConnection
-
releaseSavepoint
- Specified by:
releaseSavepointin interfaceorg.datanucleus.store.connection.ManagedConnection- Overrides:
releaseSavepointin classorg.datanucleus.store.connection.AbstractManagedConnection
-
rollbackToSavepoint
- Specified by:
rollbackToSavepointin interfaceorg.datanucleus.store.connection.ManagedConnection- Overrides:
rollbackToSavepointin classorg.datanucleus.store.connection.AbstractManagedConnection
-
closeAfterTransactionEnd
public boolean closeAfterTransactionEnd()- Specified by:
closeAfterTransactionEndin interfaceorg.datanucleus.store.connection.ManagedConnection- Overrides:
closeAfterTransactionEndin classorg.datanucleus.store.connection.AbstractManagedConnection
-