KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > common > ejbs > stateless > containermanaged > entitymanager > ItfTransactionContextTester


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: ItfTransactionContextTester.java 844 2006-07-12 09:28:58Z pinheirg $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.entitymanager;
27
28 import org.objectweb.easybeans.tests.common.ejbs.entity.ebstore.EBStore;
29
30 /**
31  * Verifies the use of the entity manager in different transaction context.
32  * @author Gisele Pinheiro Souza
33  * @author Eduardo Studzinski Estima de Castro
34  *
35  */

36 public interface ItfTransactionContextTester {
37
38     /**
39      * The bean id.
40      */

41     int ID = 1;
42
43     /**
44      * The bean name.
45      */

46     String JavaDoc NAME = "test";
47
48     /**
49      * Creates a entity bean in a transaction context and call other method that has a different
50      * transaction to persist the bean.
51      */

52     void createBeanRequiresNewWithClientTransaction();
53
54     /**
55      * Creates a entity bean without a transaction context and call other method
56      * that has a transaction to persist the bean.
57      */

58      void createBeanRequiresNewWithoutClientTransaction();
59
60     /**
61      * Creates a entity bean and call other method that has the same transaction
62      * to persist the bean.
63      */

64     void createBeanRequired();
65
66     /**
67      * Makes the persist and does not use the client transaction.
68      * @param entity the entity class to be stored.
69      */

70     void persistRequiresNew(final EBStore entity);
71
72     /**
73      * Makes the persist and use the client transaction.
74      * @param entity the entity class to be stored.
75      */

76     void persistRequired(final EBStore entity);
77
78     /**
79      * Deletes the bean with the default value.
80      */

81     void deleteBean();
82
83 }
84
Popular Tags