KickJava   Java API By Example, From Geeks To Geeks.

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


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

42 public class TestNever extends TestContainerTransactionBase {
43
44     /**
45      * Verifies if the container uses the same transaction that the client. The
46      * transaction attribute never throws an error if the method is called when
47      * the client has a transaction context.
48      * @input -
49      * @output an EJBException because the client is in a transaction context.
50      * @throws Exception if an error during the tests occurs.
51      */

52     @Override JavaDoc
53     public void testUsingClientTrans() throws Exception JavaDoc {
54         super.testUsingClientTrans();
55     }
56
57     /**
58      * Verifies if the EJBContext.setRollbackOnly() works properly.
59      * For the attribute never, the container must throw an IllegalStateException.
60      * @input -
61      * @output an IllegalStateException must be thrown.
62      * @throws Exception if an error during the test occurs.
63      */

64     @Override JavaDoc
65     public void testSetRollbackOnly() throws Exception JavaDoc {
66         super.testSetRollbackOnly();
67     }
68
69     /**
70      * Verifies if the EJBContext.getRollbackOnly() works properly.
71      * For the attribute never, the container must throw an IllegalStateException.
72      * @input -
73      * @output an IllegalStateException must be thrown.
74      * @throws Exception if an error during the test occurs.
75      */

76     @Override JavaDoc
77     public void testGetRollbackOnly() throws Exception JavaDoc {
78         super.testGetRollbackOnly();
79     }
80
81 }
82
Popular Tags