KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > common > interfaces > ItfTestContainerManaged


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: ItfTestContainerManaged.java 319 2006-04-11 12:07:29Z pinheirg $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.easybeans.tests.common.interfaces;
27
28
29 /**
30  * Is the common interface that will be used to local and remote tests.
31  * @author Gisele Pinheiro Souza
32  * @author Eduardo Studzinski Estima de Castro
33  *
34  */

35 public interface ItfTestContainerManaged {
36
37     /**
38      * Binds the databases used.
39      * @throws Exception if an error during the test startup occurs.
40      */

41     void setup() throws Exception JavaDoc;
42
43     /**
44      * Creates a new instance of the bean. This method makes a lookup with the
45      * beanName.
46      * @param beanClass the bean class used during the tests;
47      * @throws Exception if a lookup error occurs.
48      */

49     void createBean(final Class JavaDoc beanClass) throws Exception JavaDoc;
50
51
52     /**
53      * Calls the method setRollbackOnly that must throw exception for some types
54      * of transactionattribute.After, this method tries to insert tables in the
55      * databases.
56      * @throws Exception if an error during the test occurs.
57      */

58     void testSetRollbackOnly() throws Exception JavaDoc;
59
60     /**
61      * Calls the method getRollbackOnly that must throw exception for some types
62      * of transactionattribute.
63      * @throws Exception if an error during the test occurs.
64      */

65     void testGetRollbackOnly() throws Exception JavaDoc;
66
67     /**
68      * Verifies if the container uses the same transaction that the client.
69      * Creates an UserTransaction and calls the bean method.
70      * @throws Exception if an error during the tests occurs.
71      */

72     void testUsingClientTrans() throws Exception JavaDoc;
73
74     /**
75      * Deletes the tables.
76      */

77     void deleteTable();
78
79     /**
80      * Tries to get an UserTransaction that is denied to beans with
81      * container-managed transaction.
82      * @throws Exception if an error occurs during the tests.
83      */

84     void testGetUserTransactionWithLookup() throws Exception JavaDoc;
85
86     /**
87      * Tries to get an UserTransaction that is denied to beans with
88      * container-managed transaction.
89      * @throws Exception if an error occurs during the tests.
90      */

91     void testGetUserTransactionWithEJBContext() throws Exception JavaDoc;
92 }
93
Popular Tags