org.apache.ojb.broker.accesslayer
Interface ConnectionManagerIF

All Known Implementing Classes:
ConnectionManagerImpl

public interface ConnectionManagerIF

The connection manager handles the life cycle of a connection. Each PersistenceBroker instance use it's own connection manager.


Method Summary
 void clearBatch()
          Clear batch (if the batch mode where used).
 void executeBatch()
          Execute batch (if the batch mode where used).
 void executeBatchIfNecessary()
          Execute batch if the number of statements in it exceeded the limit (if the batch mode where used).
 java.sql.Connection getConnection()
          Return a connection.
 JdbcConnectionDescriptor getConnectionDescriptor()
          Return the associated JdbcConnectionDescriptor.
 Platform getSupportedPlatform()
          Returns the supported Platform determined by the JdbcConnectionDescriptor.
 boolean isAlive(java.sql.Connection conn)
          checks if Connection conn is still open.
 boolean isBatchMode()
           
 boolean isInLocalTransaction()
          Hold connection is in local transaction.
 void localBegin()
          Begin local transaction on the hold connection and set autocommit to false.
 void localCommit()
          Commit the local transaction on the hold connection.
 void localRollback()
          Rollback a changes on the hold connection.
 void releaseConnection()
          Release the hold connection.
 void setBatchMode(boolean mode)
          Sets the batch mode on (true) or off (false).
 

Method Detail

getConnectionDescriptor

JdbcConnectionDescriptor getConnectionDescriptor()
Return the associated JdbcConnectionDescriptor.


getSupportedPlatform

Platform getSupportedPlatform()
Returns the supported Platform determined by the JdbcConnectionDescriptor.

See Also:
getConnectionDescriptor()

isAlive

boolean isAlive(java.sql.Connection conn)
checks if Connection conn is still open. returns true, if connection is open, else false.


getConnection

java.sql.Connection getConnection()
                                  throws LookupException
Return a connection.

Throws:
LookupException

isInLocalTransaction

boolean isInLocalTransaction()
Hold connection is in local transaction.


localBegin

void localBegin()
Begin local transaction on the hold connection and set autocommit to false.


localCommit

void localCommit()
Commit the local transaction on the hold connection.


localRollback

void localRollback()
Rollback a changes on the hold connection.


releaseConnection

void releaseConnection()
Release the hold connection.


setBatchMode

void setBatchMode(boolean mode)
Sets the batch mode on (true) or off (false).


isBatchMode

boolean isBatchMode()
Returns:
the batch mode.

executeBatch

void executeBatch()
Execute batch (if the batch mode where used).


executeBatchIfNecessary

void executeBatchIfNecessary()
Execute batch if the number of statements in it exceeded the limit (if the batch mode where used).


clearBatch

void clearBatch()
Clear batch (if the batch mode where used).



(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30