|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.speedo.mapper.rdb.JDBCConnectionHolder
Is an holder of JDBC connection. It can works in managed or non-managed transactional environnement.
Field Summary | |
protected java.sql.Connection |
connection
The SQL connection held. |
protected Logger |
logger
|
protected PMapper |
mapper
the mapper allocating JDBC connections |
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
The workingSet attached to this connection holder |
Constructor Summary | |
JDBCConnectionHolder(PMapper mapper,
Logger logger)
|
Method Summary | |
void |
begin()
If there is no connection already allocated, the transaction being will be during the next connection request (getConnectionFor...(...) |
protected void |
beginLocalTransaction()
Primitive method demarcating the begining of a local transaction on the current connection. |
void |
bindWorkingSet(WorkingSet workingSet)
|
void |
closeCHConnection()
|
void |
commitCH()
|
protected void |
commitLocalTransaction()
primitive method demarcating the end of a local transaction by a commit |
java.lang.Object |
getCHConnectionForRead()
|
java.lang.Object |
getCHConnectionForWrite()
|
WorkingSet |
getWorkingSet()
|
void |
releaseCHConnection()
|
void |
rollbackCH()
|
protected void |
rollbackLocalTransaction()
primitive method demarcating the end of a local transaction by a rollback |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected PMapper mapper
protected WorkingSet workingSet
protected java.sql.Connection connection
protected boolean transactional
protected boolean txManagedExternaly
protected Logger logger
Constructor Detail |
public JDBCConnectionHolder(PMapper mapper, Logger logger)
Method Detail |
protected void beginLocalTransaction() throws PersistenceException
PersistenceException
protected void commitLocalTransaction() throws PersistenceException
PersistenceException
protected void rollbackLocalTransaction() throws PersistenceException
PersistenceException
public WorkingSet getWorkingSet()
getWorkingSet
in interface ConnectionHolder
public void bindWorkingSet(WorkingSet workingSet)
bindWorkingSet
in interface ConnectionHolder
public java.lang.Object getCHConnectionForRead() throws PersistenceException
getCHConnectionForRead
in interface ConnectionHolder
PersistenceException
public java.lang.Object getCHConnectionForWrite() throws PersistenceException
getCHConnectionForWrite
in interface ConnectionHolder
PersistenceException
public void begin() throws PersistenceException
begin
in interface ConnectionHolder
PersistenceException
public void commitCH() throws PersistenceException
commitCH
in interface ConnectionHolder
PersistenceException
public void rollbackCH() throws PersistenceException
rollbackCH
in interface ConnectionHolder
PersistenceException
public void releaseCHConnection() throws PersistenceException
releaseCHConnection
in interface ConnectionHolder
PersistenceException
public void closeCHConnection() throws PersistenceException
closeCHConnection
in interface ConnectionHolder
PersistenceException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |