KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > transaction > containermanaged > base > TestRequired


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: TestRequired.java 980 2006-07-28 13:20:32Z studzine $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.easybeans.tests.transaction.containermanaged.base;
26
27
28 /**
29  * Verifies if the container-managed transaction in the session bean is
30  * following the JSR 220.The items covered in this test are: 12.6.2.2.
31  * @reference JSR 220-PROPOSED FINAL
32  * @requirement Application Server must be running; the bean
33  * org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.SFSBContainerTransactionRequired
34  * must be deployed for testing stateful session bean. And, the
35  * bean
36  * org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.SLSBContainerTransactionRequired
37  * must be deployed for testing stateful session bean.
38  * @setup gets the reference of the bean and binds the databases specified in
39  * the EmbeddedTest.
40  * @author Gisele Pinheiro Souza
41  * @author Eduardo Studzinski Estima de Castro
42  */

43 public class TestRequired extends TestContainerTransactionBase {
44
45
46     /**
47      * Verifies if the container uses the same transaction that the client. The
48      * client rollback must to force a bean rollback, because the both use the
49      * same transaction.
50      * @input -
51      * @output a SQLException because the table must not be created.
52      * @throws Exception if an error during the tests occurs.
53      */

54     @Override JavaDoc
55     public void testUsingClientTrans() throws Exception JavaDoc {
56         super.testUsingClientTrans();
57     }
58
59     /**
60      * Calls a setRollbackOnly and after inserts two tables. The container must
61      * do a roll back before the method invocation completes. So, the tables
62      * must not be created and a SQLException must be thrown when the test tries
63      * to verify if the table exists.
64      * @input -
65      * @output an exception when the method verifies if the table exists.
66      * @throws Exception if an error occurs during the tests.
67      */

68     @Override JavaDoc
69     public void testSetRollbackOnly() throws Exception JavaDoc {
70         super.testSetRollbackOnly();
71     }
72
73     /**
74      * Calls the getRollbackOnly that must not throw any exception for this type
75      * of transaction attribute.
76      * @input -
77      * @output the method execution without error.
78      * @throws Exception if an error occurs during the tests.
79      */

80     @Override JavaDoc
81     public void testGetRollbackOnly() throws Exception JavaDoc {
82         super.testGetRollbackOnly();
83     }
84 }
85
Popular Tags