1 package org.enhydra.shark.api; 2 3 /** 4 * User and group information may be stored in separate repository 5 * so it may need a different type of transaction. To represent this, 6 * UserTransaction is another interface different from SharkTransaction, 7 * and other transaction interfaces. 8 * 9 * @see SharkTransaction 10 * @author Tanja Jovanovic 11 */ 12 public interface UserTransaction { 13 14 /** 15 * Commits user transaction. 16 * 17 * @exception TransactionException If something unexpected happens. 18 */ 19 public void commit () throws TransactionException; 20 21 /** 22 * Rollbacks user transaction. This method is called when commit 23 * method fails. 24 * 25 * @exception TransactionException If something unexpected happens. 26 */ 27 public void rollback () throws TransactionException; 28 29 /** 30 * Releases user transaction. Method <b>MUST</b> be called for each transaction. 31 * 32 * @exception TransactionException If something unexpected happens. 33 */ 34 public void release() throws TransactionException; 35 36 } 37