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: ItfTestContainerManaged.java 1970 2007-10-16 11:49:25Z benoitf $
23: * --------------------------------------------------------------------------
24: */package org.ow2.easybeans.tests.common.interfaces;
25:
26: /**
27: * Is the common interface that will be used to local and remote tests.
28: * @author Gisele Pinheiro Souza
29: * @author Eduardo Studzinski Estima de Castro
30: *
31: */
32: public interface ItfTestContainerManaged {
33:
34: /**
35: * Binds the databases used.
36: * @throws Exception if an error during the test startup occurs.
37: */
38: void setup() throws Exception;
39:
40: /**
41: * Creates a new instance of the bean. This method makes a lookup with the
42: * beanName.
43: * @param beanClass the bean class used during the tests;
44: * @throws Exception if a lookup error occurs.
45: */
46: void createBean(final Class beanClass) throws Exception;
47:
48: /**
49: * Calls the method setRollbackOnly that must throw exception for some types
50: * of transactionattribute.After, this method tries to insert tables in the
51: * databases.
52: * @throws Exception if an error during the test occurs.
53: */
54: void testSetRollbackOnly() throws Exception;
55:
56: /**
57: * Calls the method getRollbackOnly that must throw exception for some types
58: * of transactionattribute.
59: * @throws Exception if an error during the test occurs.
60: */
61: void testGetRollbackOnly() throws Exception;
62:
63: /**
64: * Verifies if the container uses the same transaction that the client.
65: * Creates an UserTransaction and calls the bean method.
66: * @throws Exception if an error during the tests occurs.
67: */
68: void testUsingClientTrans() throws Exception;
69:
70: /**
71: * Deletes the tables.
72: */
73: void deleteTable();
74:
75: /**
76: * Tries to get an UserTransaction that is denied to beans with
77: * container-managed transaction.
78: * @throws Exception if an error occurs during the tests.
79: */
80: void testGetUserTransactionWithLookup() throws Exception;
81:
82: /**
83: * Tries to get an UserTransaction that is denied to beans with
84: * container-managed transaction.
85: * @throws Exception if an error occurs during the tests.
86: */
87: void testGetUserTransactionWithEJBContext() throws Exception;
88: }
|