KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jtests > beans > beanexc > AccountSY


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: AccountSY.java,v 1.2 2002/05/03 15:10:15 jonas Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 // AccountSY.java
27

28 package org.objectweb.jonas.jtests.beans.beanexc;
29
30 import javax.ejb.SessionSynchronization JavaDoc;
31
32 /*
33  * Stateful session bean
34  */

35
36 public class AccountSY extends AccountSL implements SessionSynchronization JavaDoc {
37
38
39     // ------------------------------------------------------------------
40
// SessionSynchronization implementation
41
// ------------------------------------------------------------------
42

43     /**
44      * The afterBegin method notifies a session Bean instance that a new
45      * transaction has started, and that the subsequent business methods on
46      * the instance will be invoked in the context of the transaction.
47      * This method executes in the proper transaction context.
48      *
49      * @throws EJBException Thrown if the instance could not perform
50      * the function requested by the container because of a system-level error.
51      */

52     public void afterBegin() {
53
54     }
55
56
57     /**
58      * The beforeCompletion method notifies a session Bean instance that a
59      * transaction is about to be committed.
60      * This method executes in the proper transaction context.
61      * Note: The instance may still cause the container to rollback the transaction
62      * by invoking the setRollbackOnly() method on the instance context, or by throwing
63      * an exception.
64      *
65      * @throws EJBException Thrown by the method to indicate a failure caused by a
66      * system-level error.
67      */

68     public void beforeCompletion() {
69
70     }
71
72
73     /**
74      * The afterCompletion method notifies a session Bean instance that a
75      * transaction commit protocol has completed, and tells the instance whether
76      * the transaction has been committed or rolled back.
77      * This method executes with no transaction context.
78      *
79      * @param : committed - True if the transaction has been committed, false if
80      * it has been rolled back.
81      *
82      * @throws EJBException Thrown by the method to indicate a failure caused by a
83      * system-level error.
84      */

85     public void afterCompletion(boolean committed) {
86
87     }
88
89 }
90
Popular Tags