KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > common > ejbs > stateful > containermanaged > transaction > ItfSessionSync


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: ItfSessionSync.java 808 2006-07-03 13:58:29Z pinheirg $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction;
26
27 import java.sql.SQLException JavaDoc;
28
29 import javax.naming.NamingException JavaDoc;
30
31 /**
32  * Inserts a table in the database using container-managed transaction.
33  * @author Gisele Pinheiro Souza
34  * @author Eduardo Studzinski Estima de Castro
35  *
36  */

37 public interface ItfSessionSync {
38
39     /**
40      * Table used during the tests.
41      */

42     String JavaDoc TABLE = "SFSBSEssionSync";
43
44     /**
45     * Inserts the table test in the second database with the transaction
46     * attribute REQUIRED.
47     * @throws SQLException if a databse error occurs.
48     * @throws NamingException if a lookup error occurs.
49     */

50     void insertTableRequired()throws SQLException JavaDoc, NamingException JavaDoc;
51
52     /**
53      * Inserts the table test in the second database with the transaction
54      * attribute MANDATORY.
55      * @throws SQLException if a databse error occurs.
56      * @throws NamingException if a lookup error occurs.
57      */

58     void insertTableMandatory()throws SQLException JavaDoc, NamingException JavaDoc;
59
60     /**
61      * Inserts the table test in the second database with the transaction
62      * attribute REQUIRED_NEW.
63      * @throws SQLException if a databse error occurs.
64      * @throws NamingException if a lookup error occurs.
65      */

66     void insertTableRequiredNew()throws SQLException JavaDoc, NamingException JavaDoc;
67
68     /**
69      * Inserts the table test in the second database with the transaction
70      * attribute SUPPORTS.
71      * @throws SQLException if a databse error occurs.
72      * @throws NamingException if a lookup error occurs.
73      */

74     void insertTableSupports()throws SQLException JavaDoc, NamingException JavaDoc;
75
76     /**
77      * Inserts the table test in the second database with the transaction
78      * attribute NOT_SUPPORTED.
79      * @throws SQLException if a databse error occurs.
80      * @throws NamingException if a lookup error occurs.
81      */

82     void insertTableNotSupported() throws SQLException JavaDoc, NamingException JavaDoc;
83
84     /**
85      * Inserts the table test in the second database with the transaction
86      * attribute NEVER.
87      * @throws SQLException if a databse error occurs.
88      * @throws NamingException if a lookup error occurs.
89      */

90     void insertTableNever() throws SQLException JavaDoc, NamingException JavaDoc;
91
92     /**
93      * Initializes the bean with the database name in the registry.
94      * @param dbName1 database1 name in the registry.
95      * @param dbName2 database2 name in the registry.
96      */

97     void startup(final String JavaDoc dbName1, final String JavaDoc dbName2);
98
99     /**
100      * Verifies if the transaction was rolled back.
101      * @return true if the transaction was rolled back, false otherwise.
102      */

103     boolean isRolledback();
104 }
105
Popular Tags