org.objectweb.perseus.persistence.api

Interface ConnectionHolder

Known Subinterfaces:
TransactionalConnectionHolder

public interface ConnectionHolder

The aim of a ConnectionHolder is to provide a way to find a connection to the data support. For example a previous used connection can be encapsulted in a ConnectionHolder in order to reuse it.

Author:
S.Chassande-Barrioz

Method Summary

void
begin()
Demarcates the begin of the transaction.
void
bindWorkingSet(WorkingSet ws)
void
closeCHConnection()
void
commitCH()
Committes the transaction
Object
getCHConnectionForRead()
Retrieves a connection to access data on the support for a read action.
Object
getCHConnectionForWrite()
Retrieves a connection to access data on the support for a write action.
WorkingSet
getWorkingSet()
void
releaseCHConnection()
void
rollbackCH()

Method Details

begin

public void begin()
            throws PersistenceException
Demarcates the begin of the transaction.

Throws:
PersistenceException - if it is not possible to begin a transaction


bindWorkingSet

public void bindWorkingSet(WorkingSet ws)


closeCHConnection

public void closeCHConnection()
            throws PersistenceException


commitCH

public void commitCH()
            throws PersistenceException
Committes the transaction

Throws:
PersistenceException -


getCHConnectionForRead

public Object getCHConnectionForRead()
            throws PersistenceException
Retrieves a connection to access data on the support for a read action.

Throws:
PersistenceException - if it is not possible to find a connection


getCHConnectionForWrite

public Object getCHConnectionForWrite()
            throws PersistenceException
Retrieves a connection to access data on the support for a write action.

Throws:
PersistenceException - if it is not possible to find a connection


getWorkingSet

public WorkingSet getWorkingSet()


releaseCHConnection

public void releaseCHConnection()
            throws PersistenceException


rollbackCH

public void rollbackCH()
            throws PersistenceException


Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.