public interface Transaction
Modifier and Type | Method and Description |
---|---|
void |
addListener(TransactionListener listener) |
void |
begin()
Starts a Transaction.
|
void |
commit() |
Map<String,Connection> |
getConnections()
Returns all connections associated with the transaction.
|
Connection |
getOrCreateConnection(String connectionName,
DataSource dataSource)
Retrieves a connection for the given symbolic name.
|
boolean |
isExternal()
Is this transaction managed by external transaction manager
|
boolean |
isRollbackOnly() |
void |
rollback() |
void |
setRollbackOnly() |
void begin()
void commit()
void rollback()
void setRollbackOnly()
boolean isRollbackOnly()
Connection getOrCreateConnection(String connectionName, DataSource dataSource) throws SQLException
connectionName
- a symbolic name of the connection. Cayenne DataNodes generate a name in the form of
"DataNode.Connection.nodename".dataSource
- DataSource that provides new connections.SQLException
Map<String,Connection> getConnections()
void addListener(TransactionListener listener)
boolean isExternal()
Copyright © 2001–2019 Apache Cayenne. All rights reserved.