KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > ejb > ResourcesExceededException


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.ejb;
24
25 import java.io.PrintWriter JavaDoc;
26 import java.io.PrintStream JavaDoc;
27
28 public class ResourcesExceededException extends Exception JavaDoc {
29
30     private Exception JavaDoc ex;
31
32     public ResourcesExceededException() {
33     }
34
35     public ResourcesExceededException(String JavaDoc s) {
36         super(s);
37     }
38
39     public ResourcesExceededException(Exception JavaDoc ex) {
40         super(ex.getMessage());
41         this.ex = ex;
42     }
43
44     public ResourcesExceededException(String JavaDoc s, Exception JavaDoc ex) {
45         super(s);
46         this.ex = ex;
47     }
48
49     public Exception JavaDoc getNestedException() {
50         return ex;
51     }
52
53     public void printStackTrace() {
54         super.printStackTrace();
55         if (ex != null) {
56             ex.printStackTrace();
57         }
58     }
59
60     public void printStackTrace(PrintStream JavaDoc ps) {
61         super.printStackTrace(ps);
62         if (ex != null) {
63             ex.printStackTrace(ps);
64         }
65     }
66
67     public void printStackTrace(PrintWriter JavaDoc pw) {
68         super.printStackTrace(pw);
69         if (ex != null) {
70             ex.printStackTrace(pw);
71         }
72     }
73
74 }
75
Popular Tags