1 /* TransactionFactory.java */2 3 package org.enhydra.shark.api.internal.transaction;4 5 import org.enhydra.shark.api.RootException;6 import org.enhydra.shark.api.TransactionException;7 import org.enhydra.shark.api.internal.transaction.SharkInternalTransaction;8 import org.enhydra.shark.api.internal.working.CallbackUtilities;9 10 11 /**12 * TransactionFactory interface defines methods for creating SharkTransaction.13 * @author Sasa Bojanic14 * @author Vladimir Puskas15 */16 public interface TransactionFactory {17 18 /**19 * Method configure is called at Shark start up, to configure20 * implementation of TransactionFactory.21 *22 * @param cus an instance of CallbackUtilities used to get23 * properties for configuring shark transaction manager and24 * transactions in Shark.25 *26 * @exception RootException Thrown if configuring doesn't succeed.27 */28 void configure (CallbackUtilities cus) throws RootException;29 30 /**31 * Creates shark transaction.32 *33 * @return Created shark transaction.34 *35 * @exception TransactionException If something unexpected happens.36 */37 public SharkInternalTransaction createTransaction() throws TransactionException;38 39 }40 41