KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > resource > spi > SharingViolationException


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
24 package javax.resource.spi;
25
26 /**
27  * This is thrown to indicate a connection sharing violation.
28  *
29  * <p>This may be thrown by a resource adapter when an application
30  * uses a shareable connection in an unshareable manner.
31  *
32  * @version 1.0
33  * @author Ram Jeyaraman
34  */

35 public class SharingViolationException
36         extends javax.resource.ResourceException JavaDoc {
37
38     /**
39      * Constructs a new instance with null as its detail message.
40      */

41     public SharingViolationException() { super(); }
42
43     /**
44      * Constructs a new instance with the specified detail message.
45      *
46      * @param message the detail message.
47      */

48     public SharingViolationException(String JavaDoc message) {
49     super(message);
50     }
51
52     /**
53      * Constructs a new throwable with the specified cause.
54      *
55      * @param cause a chained exception of type
56      * <code>Throwable</code>.
57      */

58     public SharingViolationException(Throwable JavaDoc cause) {
59     super(cause);
60     }
61
62     /**
63      * Constructs a new throwable with the specified detail message and cause.
64      *
65      * @param message the detail message.
66      *
67      * @param cause a chained exception of type
68      * <code>Throwable</code>.
69      */

70     public SharingViolationException(String JavaDoc message, Throwable JavaDoc cause) {
71     super(message, cause);
72     }
73
74     /**
75      * Constructs a new throwable with the specified detail message and
76      * error code.
77      *
78      * @param message a description of the exception.
79      * @param errorCode a string specifying the vendor specific error code.
80      */

81     public SharingViolationException(String JavaDoc message, String JavaDoc errorCode) {
82     super(message, errorCode);
83     }
84 }
85
Popular Tags