KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > api > RepositoryTransaction


1 package org.enhydra.shark.api;
2
3 /**
4  * The XPDL packages may be stored in separate repository, so it may need a
5  * different type of transaction. To represent this, RepositoryTransaction is
6  * another interface different from SharkTransaction and other transaction
7  * interfaces.
8  *
9  * @see SharkTransaction
10  * @author Sasa Bojanic
11  */

12 public interface RepositoryTransaction {
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
Popular Tags