org.objectweb.speedo.mapper.rdb
Class JDBCConnectionHolder
java.lang.Object
org.objectweb.speedo.mapper.rdb.JDBCConnectionHolder
- public class JDBCConnectionHolder
- extends java.lang.Object
- Author:
- S.Chassande-Barrioz
Field Summary |
protected java.sql.Connection |
connection
The SQL connection held. |
protected Logger |
logger
|
protected PMapper |
mapper
|
protected boolean |
transactional
Indicates the access through the connection must be done inside a
transaction. |
protected boolean |
txManagedExternaly
Indicates if the transaction demarcations must tbe done by the
ConnectionHolder or there are already done by an environment
(an Application Server for example). |
protected WorkingSet |
workingSet
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mapper
protected PMapper mapper
logger
protected Logger logger
workingSet
protected WorkingSet workingSet
connection
protected java.sql.Connection connection
- The SQL connection held. Can be null if no connectioin has been used
transactional
protected boolean transactional
- Indicates the access through the connection must be done inside a
transaction.
txManagedExternaly
protected boolean txManagedExternaly
- Indicates if the transaction demarcations must tbe done by the
ConnectionHolder or there are already done by an environment
(an Application Server for example).
JDBCConnectionHolder
public JDBCConnectionHolder(PMapper mapper,
Logger logger)
beginLocalTransaction
protected void beginLocalTransaction()
throws PersistenceException
- Throws:
PersistenceException
commitLocalTransaction
protected void commitLocalTransaction()
throws PersistenceException
- Throws:
PersistenceException
rollbackLocalTransaction
protected void rollbackLocalTransaction()
throws PersistenceException
- Throws:
PersistenceException
getWorkingSet
public WorkingSet getWorkingSet()
bindWorkingSet
public void bindWorkingSet(WorkingSet workingSet)
getCHConnectionForRead
public java.lang.Object getCHConnectionForRead()
throws PersistenceException
- Throws:
PersistenceException
getCHConnectionForWrite
public java.lang.Object getCHConnectionForWrite()
throws PersistenceException
- Throws:
PersistenceException
begin
public void begin()
throws PersistenceException
- If there is no connection already allocated, the transaction being will
be during the next connection request (getConnectionFor...(...)
- Throws:
org.objectweb.perseus.persistence.api.PersistenceException
PersistenceException
commitCH
public void commitCH()
throws PersistenceException
- Throws:
PersistenceException
rollbackCH
public void rollbackCH()
throws PersistenceException
- Throws:
PersistenceException
releaseCHConnection
public void releaseCHConnection()
throws PersistenceException
- Throws:
PersistenceException
closeCHConnection
public void closeCHConnection()
throws PersistenceException
- Throws:
PersistenceException