01: /*
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * 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 334 2002-05-03 15:10:16Z jonas $
23: * --------------------------------------------------------------------------
24: */
25:
26: // AccountSY.java
27: package org.objectweb.jonas.jtests.beans.beanexc;
28:
29: import javax.ejb.SessionSynchronization;
30:
31: /*
32: * Stateful session bean
33: */
34:
35: public class AccountSY extends AccountSL implements
36: SessionSynchronization {
37:
38: // ------------------------------------------------------------------
39: // SessionSynchronization implementation
40: // ------------------------------------------------------------------
41:
42: /**
43: * The afterBegin method notifies a session Bean instance that a new
44: * transaction has started, and that the subsequent business methods on
45: * the instance will be invoked in the context of the transaction.
46: * This method executes in the proper transaction context.
47: *
48: * @throws EJBException Thrown if the instance could not perform
49: * the function requested by the container because of a system-level error.
50: */
51: public void afterBegin() {
52:
53: }
54:
55: /**
56: * The beforeCompletion method notifies a session Bean instance that a
57: * transaction is about to be committed.
58: * This method executes in the proper transaction context.
59: * Note: The instance may still cause the container to rollback the transaction
60: * by invoking the setRollbackOnly() method on the instance context, or by throwing
61: * an exception.
62: *
63: * @throws EJBException Thrown by the method to indicate a failure caused by a
64: * system-level error.
65: */
66: public void beforeCompletion() {
67:
68: }
69:
70: /**
71: * The afterCompletion method notifies a session Bean instance that a
72: * transaction commit protocol has completed, and tells the instance whether
73: * the transaction has been committed or rolled back.
74: * This method executes with no transaction context.
75: *
76: * @param : committed - True if the transaction has been committed, false if
77: * it has been rolled back.
78: *
79: * @throws EJBException Thrown by the method to indicate a failure caused by a
80: * system-level error.
81: */
82: public void afterCompletion(boolean committed) {
83:
84: }
85:
86: }
|