public interface DatasourceManager
Modifier and Type | Method and Description |
---|---|
java.lang.String |
beginTransaction(java.lang.String datasource,
int isolationLevel,
long timeout)
Begins a transaction against the named datasource.
|
void |
closeTransaction(java.lang.String txId)
Closes the given transaction.
|
void |
commitTransaction(java.lang.String txId)
Commits any pending statements for the given transaction.
|
SRConnection |
getConnection(long dataSource)
Retrieves a JDBC new connection for the datasource with the given id.
|
SRConnection |
getConnection(java.lang.String dataSource)
Retrieves a JDBC new connection for the given named datasource.
|
Datasource |
getDatasource(long id) |
Datasource |
getDatasource(java.lang.String name)
Looks up a datasource by name.
|
java.util.List<Datasource> |
getDatasources()
Returns a list of all known datasources currently installed.
|
DatasourceMetaProvider |
getMetaProvider() |
SRConnection |
getTransactionConnection(java.lang.String txId)
Returns the connection for a given transaction id.
|
void |
rollbackTransaction(java.lang.String txId)
Rolls back any statements executed on this transaction since the last commit or since the beginning of the
transaction
|
void |
touchTransaction(java.lang.String txId)
Updates the last-used time for the transaction, if it still exists.
|
SRConnection getConnection(java.lang.String dataSource) throws java.sql.SQLException
Throws IllegalArgumentException if the provided datasource does not exist.
java.sql.SQLException
SRConnection getConnection(long dataSource) throws java.sql.SQLException
java.sql.SQLException
java.lang.String beginTransaction(java.lang.String datasource, int isolationLevel, long timeout) throws java.sql.SQLException
datasource
- The name of the datasource to useisolationLevel
- a constant from java.sql.Connection indicating the new transaction's isolation level.timeout
- Time to wait between uses of the transaction's connection before it will be
automatically rolled back and closed.java.sql.SQLException
void commitTransaction(java.lang.String txId) throws java.sql.SQLException
java.sql.SQLException
void rollbackTransaction(java.lang.String txId) throws java.sql.SQLException
java.sql.SQLException
void closeTransaction(java.lang.String txId) throws java.sql.SQLException
java.sql.SQLException
void touchTransaction(java.lang.String txId)
SRConnection getTransactionConnection(java.lang.String txId) throws java.sql.SQLException
java.sql.SQLException
Datasource getDatasource(java.lang.String name)
Datasource getDatasource(long id)
java.util.List<Datasource> getDatasources()
DatasourceMetaProvider getMetaProvider()