org.objectweb.perseus.persistence.api

Interface TransactionalPersistenceManager

All Superinterfaces:
PersistenceManager
Known Implementing Classes:
TransactionalPersistenceManagerImpl

public interface TransactionalPersistenceManager
extends PersistenceManager

It defines a persistence manager able to manage context transactional or not.

Author:
Luciano Garcia-Banuelos (Luciano.Garcia@imag.fr)

Method Summary

void
begin(TransactionalWorkingSet context)
converts a context to a transaction
void
commit(TransactionalWorkingSet context)
commits a transactional context.
boolean
prepare(TransactionalWorkingSet context)
Prepare the transactinal context.
void
rollback(TransactionalWorkingSet context)
rollbacks a transactional context.

Methods inherited from interface org.objectweb.perseus.persistence.api.PersistenceManager

accessCompletion, close, createWS, createWS, evict, evictAll, export, export, flush, flush, readIntention, readIntention, refresh, refresh, unbind, unbind, unexport, unexport, writeIntention, writeIntention

Method Details

begin

public void begin(TransactionalWorkingSet context)
            throws PersistenceException
converts a context to a transaction

Parameters:
context - becomes transactional

Throws:
PersistenceException - if the context is already transactional.


commit

public void commit(TransactionalWorkingSet context)
            throws PersistenceException
commits a transactional context. The call to the prepare method is required.

Parameters:
context -

Throws:
PersistenceException - if an error raised during the commit operation, or if the context is not a transactional context.


prepare

public boolean prepare(TransactionalWorkingSet context)
            throws PersistenceException
Prepare the transactinal context.

Parameters:
context - the

Returns:
true if the transaction can be commit or false is the transaction must be rolled back.

Throws:
PersistenceException - if an error raised during the prepare operation, or if the context is not a transactional context.


rollback

public void rollback(TransactionalWorkingSet context)
            throws PersistenceException
rollbacks a transactional context. The call to the prepare method is required.

Parameters:
context -

Throws:
PersistenceException - if an error raised during the rollback operation, or if the context is not a transactional context.


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