KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openejb > ApplicationException


1 /**
2  * Redistribution and use of this software and associated documentation
3  * ("Software"), with or without modification, are permitted provided
4  * that the following conditions are met:
5  *
6  * 1. Redistributions of source code must retain copyright
7  * statements and notices. Redistributions must also contain a
8  * copy of this document.
9  *
10  * 2. Redistributions in binary form must reproduce the
11  * above copyright notice, this list of conditions and the
12  * following disclaimer in the documentation and/or other
13  * materials provided with the distribution.
14  *
15  * 3. The name "Exolab" must not be used to endorse or promote
16  * products derived from this Software without prior written
17  * permission of Exoffice Technologies. For written permission,
18  * please contact info@exolab.org.
19  *
20  * 4. Products derived from this Software may not be called "Exolab"
21  * nor may "Exolab" appear in their names without prior written
22  * permission of Exoffice Technologies. Exolab is a registered
23  * trademark of Exoffice Technologies.
24  *
25  * 5. Due credit should be given to the Exolab Project
26  * (http://www.exolab.org/).
27  *
28  * THIS SOFTWARE IS PROVIDED BY EXOFFICE TECHNOLOGIES AND CONTRIBUTORS
29  * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
30  * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
31  * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
32  * EXOFFICE TECHNOLOGIES OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
33  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
34  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
35  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
37  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
39  * OF THE POSSIBILITY OF SUCH DAMAGE.
40  *
41  * Copyright 1999 (C) Exoffice Technologies Inc. All Rights Reserved.
42  *
43  * $Id: ApplicationException.java 1096 2004-03-26 21:41:16Z dblevins $
44  */

45
46 package org.openejb;
47
48 /**
49  * --------------
50  * EJB 2.0
51  *
52  * 18.1.1 Application exceptions
53  *
54  * An application exception is an exception defined in the throws clause of a
55  * method of the enterprise bean’s home and component interfaces, other than
56  * the java.rmi.RemoteException.
57  *
58  * Enterprise bean business methods use application exceptions to inform the
59  * client of abnormal application-level conditions, such as unacceptable values
60  * of the input arguments to a business method. A client can typically recover
61  * from an application exception.
62  *
63  * Application exceptions are not intended for reporting system-level problems.
64  *
65  * ---------------
66  *
67  *
68  * This exception is thrown when a normal EnterpriseBean exception is thrown.
69  *
70  * The ApplicationException's nested exception will be either an EJB spec
71  * defined ApplicationException ( or a custom exception defined by the bean
72  * developer) or a RemoteException.
73  *
74  * The org.openejb.ApplicationException must be caught and its nested
75  * exception rethrown by the bean proxy to the client.
76  *
77  * The org.openejb.ApplicationException is non-system exception; it does NOT
78  * indicate a problem with the contaienr itself.
79  *
80  * @see ApplicationException
81  * @see InvalidateReferenceException
82  * @see OpenEJBException
83  * @see SystemException
84  */

85 public class ApplicationException extends OpenEJBException {
86
87     /**
88      * Constructs an empty ApplicationException instance.
89      */

90     public ApplicationException( ){super();}
91     
92     /**
93      * Constructs a ApplicationException with the specified message indicating
94      * the source of the problem that occurred.
95      *
96      * @param message <code>String</code> identifying the source of the problem.
97      */

98     public ApplicationException(String JavaDoc message){
99         super(message);
100     }
101
102     /**
103      * Constructs a ApplicationException with the source of the problem that occurred.
104      *
105      * @param e
106      */

107     public ApplicationException(Exception JavaDoc e){
108         super(e);
109     }
110
111     public ApplicationException(Throwable JavaDoc t){
112         super(t);
113     }
114     
115     /**
116      * Constructs a ApplicationException with the specified message indicating
117      * the source of the problem that occurred and the original "root cause" exception
118      * that was thrown when the problem occurred.
119      *
120      * @param message <code>String</code> identifying the source of the problem.
121      * @param e
122      */

123     public ApplicationException(String JavaDoc message, Exception JavaDoc e){
124     super(message,e);
125     }
126 }
Popular Tags