/*
 * JOnAS: Java(TM) Open Application Server
 * Copyright (C) 1999 Bull S.A.
 * Contact: jonas-team@objectweb.org
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 * USA
 *
 * --------------------------------------------------------------------------
 * $Id$
 * --------------------------------------------------------------------------
 */

// AccountSY.java

package org.objectweb.jonas.jtests.beans.beanexc;

import javax.ejb.SessionSynchronization;

/*
 * Stateful session bean
 */

public class AccountSY extends AccountSL implements SessionSynchronization {


    // ------------------------------------------------------------------
    // SessionSynchronization implementation
    // ------------------------------------------------------------------

    /** 
     * The afterBegin method notifies a session Bean instance that a new 
     * transaction has started, and that the subsequent business methods on
     * the instance will be invoked in the context of the transaction. 
     * This method executes in the proper transaction context. 
     *
     * @throws EJBException Thrown if the instance could not perform
     * the function requested by the container because of a system-level error.
     */
    public void afterBegin() {

    }


    /** 
     * The beforeCompletion method notifies a session Bean instance that a
     * transaction is about to be committed. 
     * This method executes in the proper transaction context. 
     * Note: The instance may still cause the container to rollback the transaction
     * by invoking the setRollbackOnly() method on the instance context, or by throwing
     * an exception. 
     *   
     * @throws EJBException Thrown by the method to indicate a failure caused by a
     * system-level error.
     */
    public void beforeCompletion() {

    }


    /** 
     * The afterCompletion method notifies a session Bean instance that a
     * transaction commit protocol has completed, and tells the instance whether
     * the transaction has been committed or rolled back. 
     * This method executes with no transaction context. 
     *
     * @param : committed - True if the transaction has been committed, false if
     * it has been rolled back.
     * 
     * @throws EJBException Thrown by the method to indicate a failure caused by a
     * system-level error.
     */
    public void afterCompletion(boolean committed) {

    }

}
