1 /** 2 * EasyBeans 3 * Copyright (C) 2006 Bull S.A.S. 4 * Contact: easybeans@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: ItfBasicBeanLocal.java 640 2006-06-13 09:21:05Z pinheirg $ 23 * -------------------------------------------------------------------------- 24 */ 25 26 package org.objectweb.easybeans.tests.common.ejbs.base.xmldescriptor; 27 28 import javax.naming.NamingException; 29 import javax.transaction.HeuristicMixedException; 30 import javax.transaction.HeuristicRollbackException; 31 import javax.transaction.NotSupportedException; 32 import javax.transaction.RollbackException; 33 import javax.transaction.SystemException; 34 35 import org.objectweb.easybeans.tests.common.exception.TransactionException; 36 37 /** 38 * The bean local interface used to test the definition by deployment descriptor. 39 * @author Gisele Pinheiro Souza 40 * @author Eduardo Studzinski Estima de Castro 41 * 42 */ 43 public interface ItfBasicBeanLocal { 44 45 /** 46 * Opens a transaction without close. If the bean is stateless, this method 47 * call will throw an EJBException.However, for a stateful the method will 48 * be executed without problem. 49 * @throws NamingException if a problem to get the transaction occurs. 50 * @throws NotSupportedException if the bean is already associated with a transaction. 51 * @throws SystemException if an unexpected error occurs during the transaction. 52 */ 53 void openTransaction() throws NamingException, NotSupportedException, SystemException; 54 55 /** 56 * Verifies if the bean has a bean-managed transaction. If the transaction 57 * type is defined as container managed transaction, this method must throw 58 * an exception. 59 * @throws NamingException if a lookup error occurs. 60 * @throws SystemException if an unexpected error occurs. 61 * @throws NotSupportedException if the resquest cannot be made. 62 * @throws HeuristicRollbackException if a heuristic decision was made and 63 * some relevant update was rolled back. 64 * @throws RollbackException if the transaction was rolled back instead of 65 * committed. 66 * @throws HeuristicMixedException if a heuristic decision was made and some 67 * relevant update was commited and others rolled back. 68 * @throws TransactionException if a rollback was made. 69 */ 70 void verifyBMT() throws IllegalStateException, SecurityException, HeuristicMixedException, 71 HeuristicRollbackException, RollbackException, SystemException, NotSupportedException, NamingException; 72 73 } 74