KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.enhydra.shark.api;
2
3 /**
4  * Since Shark tends to be a transaction oriented, this is
5  * the interface that the kernel uses to signal operations on the
6  * transaction.
7  *
8  * @author Sasa Bojanic
9  * @author Vladimir Puskas
10  */

11 public interface SharkTransaction {
12
13    /**
14     * Method commit is invoked from the kernel when
15     * it has changed something that has to be commited into
16     * database.
17     *
18     * @exception TransactionException thrown if anything goes wrong.
19     */

20    public void commit () throws TransactionException;
21
22    /**
23     * Method rollback is called by the kernel when commit
24     * method fails (throws an exception).
25     *
26     * @exception TransactionException thrown if anything goes wrong.
27     */

28    public void rollback () throws TransactionException;
29
30    /**
31     * Method release <b>MUST</b> be called (in kernel it is called)
32     * for each transaction.
33     *
34     * @exception TransactionException thrown if anything goes wrong.
35     */

36    public void release() throws TransactionException;
37 }
38 /* Enf of SharkTransaction.java */
39
40
Popular Tags