Method Summary |
|
public void | clearBatch() Clear batch (if the batch mode where used). |
public void | executeBatch() Execute batch (if the batch mode where used). |
public void | executeBatchIfNecessary() Execute batch if the number of statements in it
exceeded the limit (if the batch mode where used). |
public Connection | getConnection() Returns the underlying connection, requested from
org.apache.ojb.broker.accesslayer.ConnectionFactory .
PB#beginTransaction() opens a single jdbc connection via
PB#serviceConnectionManager().localBegin().
If you call PB#serviceConnectionManager().getConnection() later
it returns the already opened connection.
The PB instance will release the used connection during
PB#commitTransaction() or PB#abortTransaction() or PB#close().
NOTE: Never call Connection.close() on the connection requested from the ConnectionManager.
Cleanup of used connection is done by OJB itself. |
public JdbcConnectionDescriptor | getConnectionDescriptor() |
public Platform | getSupportedPlatform() |
public ConnectionFactory | getUnderlyingConnectionFactory() Returns the underlying used
org.apache.ojb.broker.accesslayer.ConnectionFactory implementation. |
public boolean | isAlive(Connection conn) Check if underlying connection was alive. |
public boolean | isBatchMode() |
public boolean | isInLocalTransaction() |
public void | localBegin() Start transaction on the underlying connection. |
public void | localCommit() Call commit on the underlying connection. |
public void | localRollback() Call rollback on the underlying connection. |
public void | releaseConnection() Release connection to the
org.apache.ojb.broker.accesslayer.ConnectionFactory , make
sure that you call the method in either case, it's the only way to free the connection. |
protected void | restoreAutoCommitState() Reset autoCommit state. |
public void | setBatchMode(boolean mode) Sets the batch mode on or off - this
switch only works if you set attribute batch-mode
in jdbc-connection-descriptor true and your database
support batch mode. |