KickJava   Java API By Example, From Geeks To Geeks.

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


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: TestRequiredNew.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.4.
31  * @reference JSR 220-PROPOSED FINAL
32  * @requirement Application Server must be running; the bean
33  * org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.SFSBContainerTransactionRequiredNew
34  * must be deployed for testing stateful session bean. And, the
35  * bean
36  * org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.SLSBContainerTransactionRequiredNew
37  * must be deployed for testing stateless session bean.
38  * @setup gets the reference of SFSBContainerTransactionRequiredNew and binds
39  * the databases specified in the EmbeddedTest.
40  * @author Gisele Pinheiro Souza
41  * @author Eduardo Studzinski Estima de Castro
42  */

43 public class TestRequiredNew extends TestContainerTransactionBase {
44
45
46
47     /**
48      * Calls a setRollbackOnly and after inserts two tables. The container must
49      * do a roll back before the method invocation completes. So, the tables
50      * must not be created and a SQLException must be thrown when the test tries
51      * to verify if the table exists.
52      * @input -
53      * @output an exception when the method verifies if the table exists.
54      * @throws Exception if an error occurs during the tests.
55      */

56     @Override JavaDoc
57     public void testSetRollbackOnly() throws Exception JavaDoc {
58         super.testSetRollbackOnly();
59     }
60
61     /**
62      * Calls the getRollbackOnly that must not throw any exception for this type
63      * of transaction attribute.
64      * @input -
65      * @output the method execution without error.
66      * @throws Exception if an error occurs during the tests.
67      */

68     @Override JavaDoc
69     public void testGetRollbackOnly() throws Exception JavaDoc {
70         super.testGetRollbackOnly();
71     }
72 }
73
Popular Tags