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