net.sourceforge.esw.collection
Interface ITransactionalTransducer

All Superinterfaces:
ITransducer, java.io.Serializable
All Known Implementing Classes:
AJDBCTransducer

public interface ITransactionalTransducer
extends ITransducer

Performs Transduction between a transactional data sourcees and an IMetaCollection instance.

This interface defines three methods beyaond the scope of the base ITransducer interface. Those methods add the transactional abilities to this ITransactionalTransducer interface.

To enable transactions, one must first call the setAutoCommit method passing in true. Otherwise, the default get or put code will automatically commit during their execution.

See Also:
AggregateTransactionManager

Method Summary
 void commit()
          Commits any get or put invocation up to the last (if any) commit previously invoked.
 void rollback()
          Rolls back any get or put invocation up to the last (if any) rollback previously invoked.
 void setAutoCommit(boolean aAutoCommit)
          Sets whether any get or put invocations will automatically commit during their execution.
 
Methods inherited from interface net.sourceforge.esw.collection.ITransducer
get, getContextFactory, put, setContextFactory
 

Method Detail

commit

public void commit()
            throws TransducerException
Commits any get or put invocation up to the last (if any) commit previously invoked. This method must be called to complete the transduction if the setAutoCommit is set to true.
Throws:
TransducerException - if an error occurred during the commit process.

rollback

public void rollback()
              throws TransducerException
Rolls back any get or put invocation up to the last (if any) rollback previously invoked.
Throws:
TransducerException - if an error occurred during the rollback process.

setAutoCommit

public void setAutoCommit(boolean aAutoCommit)
Sets whether any get or put invocations will automatically commit during their execution.
Parameters:
aAutoCommit - if true, will automatically commit the transduction during get or put execution. If false, then commit must be called to complete the transduction.


Copyright 2002 Free Software Foundation. All Rights Reserved.