org.jvnet.hk2.config
Class Transaction

java.lang.Object
  extended by org.jvnet.hk2.config.Transaction

public class Transaction
extends java.lang.Object

Simple transaction mechanism for config-api objects

Author:
Jerome Dochez

Constructor Summary
Transaction()
           
 
Method Summary
 java.util.List<java.beans.PropertyChangeEvent> commit()
          Commits all participants to this transaction
 void rollback()
          Rollbacks all participants to this transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transaction

public Transaction()
Method Detail

rollback

public void rollback()
Rollbacks all participants to this transaction.


commit

public java.util.List<java.beans.PropertyChangeEvent> commit()
                                                      throws RetryableException,
                                                             TransactionFailure
Commits all participants to this transaction

Returns:
list of PropertyChangeEvent for the changes that were applied to the participants during the transaction.
Throws:
RetryableException - if the transaction cannot commit at this time but could succeed later.
TransactionFailure - if the transaction commit failed.


Copyright © 2009 Sun Microsystems, Inc.. All Rights Reserved.