KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > resource > spi > LocalTransaction


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package javax.resource.spi;
25
26 import javax.resource.ResourceException JavaDoc;
27
28 /** LocalTransaction interface provides support for transactions that
29  * are managed internal to an EIS resource manager, and do not require
30  * an external transaction manager.
31  *
32  * <p>A resource adapter implements the javax.resource.spi.LocalTransaction
33  * interface to provide support for local transactions that are performed
34  * on the underlying resource manager.
35  *
36  * <p>If a resource adapter supports the LocalTransaction interface, then
37  * the application server can choose to perform local transaction
38  * optimization (uses local transaction instead of a JTA transaction for
39  * a single resource manager case).
40  *
41  * @version 0.5
42  * @author Rahul Sharma
43  * @see javax.resource.spi.ManagedConnection
44  **/

45
46
47
48 public interface LocalTransaction {
49   /** Begin a local transaction
50    *
51    * @throws ResourceException generic exception if operation fails
52    * @throws LocalTransactionException
53    * error condition related
54    * to local transaction management
55    * @throws ResourceAdapterInternalException
56    * error condition internal to resource
57    * adapter
58    * @throws EISSystemException EIS instance specific error condition
59   **/

60   public
61   void begin() throws ResourceException JavaDoc;
62
63   /** Commit a local transaction
64    *
65    * @throws ResourceException generic exception if operation fails
66    * @throws LocalTransactionException
67    * error condition related
68    * to local transaction management
69    * @throws ResourceAdapterInternalException
70    * error condition internal to resource
71    * adapter
72    * @throws EISSystemException EIS instance specific error condition
73   **/

74   public
75   void commit() throws ResourceException JavaDoc;
76   
77   /** Rollback a local transaction
78    * @throws ResourceException generic exception if operation fails
79    * @throws LocalTransactionException
80    * error condition related
81    * to local transaction management
82    * @throws ResourceAdapterInternalException
83    * error condition internal to resource
84    * adapter
85    * @throws EISSystemException EIS instance specific error condition
86   **/

87   public
88   void rollback() throws ResourceException JavaDoc;
89
90 }
91
Popular Tags