KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > perseus > fos > api > FosTransaction


1 /**
2  * Copyright (C) 2000
3  */

4
5 package org.objectweb.perseus.fos.api;
6
7 import javax.transaction.xa.Xid JavaDoc;
8
9 /**
10  * Defines the means to operate FOS transactions.
11  * @author S. Chassande-Barrioz, P. Déchamboux
12  */

13 public interface FosTransaction extends FosAccess {
14     /**
15      * Begins a FOS transaction with no DTP context.
16      */

17     void begin() throws FosException;
18
19     /**
20      * Begins a FOS transaction with a DTP context.
21      * @param xid The DTP identifier associated with this FOS transaction. It
22      * is null if non XA runtime environment.
23      */

24     void begin(Xid JavaDoc xid) throws FosException;
25
26     /**
27      * Specifies if this FOS transaction is active or not. true means that
28      * it has begun but it has not been committed or rollbacked yet.
29      */

30     boolean isActive();
31
32     /**
33      * Prepares a FOS transaction for commit.
34      * @return true if all objects used by this transaction was just read.
35      */

36     boolean prepare() throws FosException;
37
38     /**
39      * Commits a FOS transaction.
40      */

41     void commit() throws FosException;
42
43     /**
44      * Roolbacks a FOS transaction.
45      */

46     void rollback() throws FosException;
47 }
Popular Tags