org.apache.ojb.broker.accesslayer
Interface ConnectionManagerIF

All Known Implementing Classes:
ConnectionManagerImpl

public interface ConnectionManagerIF

The connection manager handle 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

public JdbcConnectionDescriptor getConnectionDescriptor()
Return the associated JdbcConnectionDescriptor


getSupportedPlatform

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

See Also:
getConnectionDescriptor()

isAlive

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


getConnection

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

Throws:
LookupException

isInLocalTransaction

public boolean isInLocalTransaction()
Hold connection is in local transaction.


localBegin

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


localCommit

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


localRollback

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


releaseConnection

public void releaseConnection()
Release the hold connection.


setBatchMode

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


isBatchMode

public boolean isBatchMode()
Returns:
the batch mode.

executeBatch

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


executeBatchIfNecessary

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


clearBatch

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



(C) 2002 - 2004 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.3, 2005-04-2