KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > common > ejbs > stateless > containermanaged > exception > ItfExceptionXML


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: ItfExceptionXML.java 799 2006-06-29 12:17:01Z pinheirg $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.exception;
27
28 import java.sql.SQLException JavaDoc;
29
30 import javax.naming.NamingException JavaDoc;
31 import javax.transaction.NotSupportedException JavaDoc;
32 import javax.transaction.SystemException JavaDoc;
33
34 import org.objectweb.easybeans.tests.common.exception.CustomException00;
35 import org.objectweb.easybeans.tests.common.exception.RollbackApplicationException;
36
37 /**
38  * Inserts a table in the database and throws application exceptions defined in
39  * the deployment descriptor.
40  * @author Gisele Pinheiro Souza
41  * @author Eduardo Studzinski Estima de Castro
42  */

43 public interface ItfExceptionXML {
44
45     /**
46      * Name of table that is created during the test.
47      */

48     String JavaDoc TABLE = "SLSBExceptionXML";
49
50     /**
51      * Inserts a table in the database and aftser throws an exception that is
52      * defined in the deployment descriptor as application exception with
53      * rollback false.
54      * @param dbName the database name in the registry.
55      * @throws NamingException if a lookup error occurs.
56      * @throws SystemException if an unexpected error occurs.
57      * @throws NotSupportedException if the resquest cannot be made.
58      * @throws SQLException if a database error occurs.
59      */

60     void createTableWithAppException(final String JavaDoc dbName) throws NamingException JavaDoc, NotSupportedException JavaDoc,
61             SystemException JavaDoc, SQLException JavaDoc;
62
63     /**
64      * Inserts a table in the database and aftser throws an exception that is
65      * defined in the deployment descriptor as application exception with
66      * rollback true.
67      * @param dbName the database name in the registry.
68      * @throws NamingException if a lookup error occurs.
69      * @throws SystemException if an unexpected error occurs.
70      * @throws NotSupportedException if the resquest cannot be made.
71      * @throws SQLException if a database error occurs.
72      * @throws CustomException00 an application exception defined in the
73      * deployment descriptor, it is always thrown.
74      */

75     void createTableWithAppExceptionAndRollback(final String JavaDoc dbName) throws NamingException JavaDoc, NotSupportedException JavaDoc,
76             SystemException JavaDoc, SQLException JavaDoc, CustomException00;
77
78     /**
79      * Inserts a table in the database and after throws an exception that is
80      * defined by annotation, but the rollback element is overrided in the
81      * deployment descriptor.
82      * @param dbName the database name in the registry.
83      * @throws NamingException if a lookup error occurs.
84      * @throws SystemException if an unexpected error occurs.
85      * @throws NotSupportedException if the resquest cannot be made.
86      * @throws SQLException if a database error occurs.
87      * @throws RollbackApplicationException an application exception defined in
88      * the deployment descriptor, it is always thrown.
89      */

90     public void createTableWithAppExceptionOverride(final String JavaDoc dbName) throws NamingException JavaDoc, NotSupportedException JavaDoc,
91             SystemException JavaDoc, SQLException JavaDoc, RollbackApplicationException;
92
93     /**
94      * Inserts a table in the database and after throws an exception that is
95      * defined in the deployment descriptor as application exception with
96      * the default value for the rollback.
97      * @param dbName the database name in the registry.
98      * @throws NamingException if a lookup error occurs.
99      * @throws SystemException if an unexpected error occurs.
100      * @throws NotSupportedException if the resquest cannot be made.
101      * @throws SQLException if a database error occurs.
102      */

103     public void createTableWithAppExceptionDefault(final String JavaDoc dbName) throws NamingException JavaDoc, NotSupportedException JavaDoc,
104             SystemException JavaDoc, SQLException JavaDoc;
105
106 }
107
Popular Tags