public interface ManagedConnection
getConnection, and returned using
release.
Modifier and Type | Method and Description |
---|---|
void |
addListener(ManagedConnectionResourceListener listener)
Registers a ManagedConnectionResourceListener to be notified of events.
|
void |
close()
Close the connection to the datastore.
|
boolean |
closeAfterTransactionEnd()
Convenience method for whether this connection should be closed after the end of transaction.
|
boolean |
closeOnRelease() |
boolean |
commitOnRelease() |
Object |
getConnection()
Accessor for the datastore connection.
|
XAResource |
getXAResource()
An XAResoure for this datastore connection.
|
boolean |
isLocked() |
void |
lock() |
void |
release()
Method to release the datastore connection back.
|
void |
releaseSavepoint(String name)
Release the named savepoint (or do nothing if not supported).
|
void |
removeListener(ManagedConnectionResourceListener listener)
Deregister a ManagedConnectionResourceListener.
|
void |
rollbackToSavepoint(String name)
Rollback the connection to the named savepoint (or do nothing if not supported).
|
void |
setCloseOnRelease(boolean close) |
void |
setCommitOnRelease(boolean commit) |
void |
setSavepoint(String name)
Set this position in the txn as a savepoint with the provided name (if supported, otherwise do nothing).
|
void |
transactionFlushed()
Flush the connection.
|
void |
transactionPreClose()
Prepare the connection for end of transaction.
|
void |
unlock() |
Object getConnection()
void release()
void transactionFlushed()
ManagedConnectionResourceListener.transactionFlushed()
void transactionPreClose()
ManagedConnectionResourceListener.transactionPreClose()
void close()
ManagedConnectionResourceListener.managedConnectionPreClose()
and
ManagedConnectionResourceListener.managedConnectionPostClose()
.
The listeners are unregistered after this method is invoked.void setCommitOnRelease(boolean commit)
void setCloseOnRelease(boolean close)
boolean commitOnRelease()
boolean closeOnRelease()
XAResource getXAResource()
boolean isLocked()
void lock()
void unlock()
void addListener(ManagedConnectionResourceListener listener)
listener
- The listenervoid removeListener(ManagedConnectionResourceListener listener)
listener
- The listenerboolean closeAfterTransactionEnd()
void setSavepoint(String name)
name
- Name of savepointvoid releaseSavepoint(String name)
name
- Name of savepointvoid rollbackToSavepoint(String name)
name
- Name of savepointCopyright © 2019. All rights reserved.