KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > sql > SQLTransientConnectionException


1 /*
2  * %W% %E%
3  *
4  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.sql;
9
10 /**
11  * The subclass of {@link SQLException} for the SQLState class
12  * value '<i>08</i>', representing
13  * that the connection operation that failed might be able to succeed when
14  * the operation is retried without any application-level changes.
15  *<p>
16  *
17  * @since 1.6
18  */

19 public class SQLTransientConnectionException extends java.sql.SQLTransientException JavaDoc {
20
21     /**
22      * Constructs a <code>SQLTransientConnectionException</code> object.
23          * The <code>reason</code>, <code>SQLState</code> are initialized
24          * to <code>null</code> and the vendor code is initialized to 0.
25          *
26          * The <code>cause</code> is not initialized, and may subsequently be
27          * initialized by a call to the
28          * {@link Throwable#initCause(java.lang.Throwable)} method.
29          * <p>
30      * @since 1.6
31          */

32     public SQLTransientConnectionException() {
33         super();
34     }
35     
36     /**
37      * Constructs a <code>SQLTransientConnectionException</code> object
38          * with a given <code>reason</code>. The <code>SQLState</code>
39          * is initialized to <code>null</code> and the vender code is initialized
40          * to 0.
41          *
42          * The <code>cause</code> is not initialized, and may subsequently be
43          * initialized by a call to the
44          * {@link Throwable#initCause(java.lang.Throwable)} method.
45          * <p>
46      * @param reason a description of the exception
47      * @since 1.6
48          */

49     public SQLTransientConnectionException(String JavaDoc reason) {
50         super(reason);
51     }
52     
53     /**
54      * Constructs a <code>SQLTransientConnectionException</code> object
55          * with a given <code>reason</code> and <code>SQLState</code>.
56          *
57          * The <code>cause</code> is not initialized, and may subsequently be
58          * initialized by a call to the
59          * {@link Throwable#initCause(java.lang.Throwable)} method. The vendor code
60          * is initialized to 0.
61          * <p>
62      * @param reason a description of the exception
63      * @param SQLState an XOPEN or SQL:2003 code identifying the exception
64      * @since 1.6
65          */

66     public SQLTransientConnectionException(String JavaDoc reason, String JavaDoc SQLState) {
67         super(reason,SQLState);
68     }
69     
70     /**
71      * Constructs a <code>SQLTransientConnectionException</code> object
72          * with a given <code>reason</code>, <code>SQLState</code> and
73          * <code>vendorCode</code>.
74          *
75          * The <code>cause</code> is not initialized, and may subsequently be
76          * initialized by a call to the
77          * {@link Throwable#initCause(java.lang.Throwable)} method.
78          * <p>
79      * @param reason a description of the exception
80      * @param SQLState an XOPEN or SQL:2003 code identifying the exception
81      * @param vendorCode a database vendor specific exception code
82      * @since 1.6
83          */

84     public SQLTransientConnectionException(String JavaDoc reason, String JavaDoc SQLState, int vendorCode) {
85         super(reason,SQLState,vendorCode);
86     }
87     
88    /**
89      * Constructs a <code>SQLTransientConnectionException</code> object
90      * with a given <code>cause</code>.
91      * The <code>SQLState</code> is initialized
92      * to <code>null</code> and the vendor code is initialized to 0.
93      * The <code>reason</code> is initialized to <code>null</code> if
94      * <code>cause==null</code> or to <code>cause.toString()</code> if
95      * <code>cause!=null</code>.
96      * <p>
97      * @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
98      * the cause is non-existent or unknown.
99      * @since 1.6
100     */

101     public SQLTransientConnectionException(Throwable JavaDoc cause) {
102         super(cause);
103     }
104
105     /**
106      * Constructs a <code>SQLTransientConnectionException</code> object
107      * with a given
108      * <code>reason</code> and <code>cause</code>.
109      * The <code>SQLState</code> is initialized to <code>null</code>
110      * and the vendor code is initialized to 0.
111      * <p>
112      * @param reason a description of the exception.
113      * @param cause the underlying reason for this <code>SQLException</code>(which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
114      * the cause is non-existent or unknown.
115     * @since 1.6
116      */

117     public SQLTransientConnectionException(String JavaDoc reason, Throwable JavaDoc cause) {
118         super(reason,cause);
119     }
120     
121     /**
122      * Constructs a <code>SQLTransientConnectionException</code> object
123      * with a given
124      * <code>reason</code>, <code>SQLState</code> and <code>cause</code>.
125      * The vendor code is initialized to 0.
126      * <p>
127      * @param reason a description of the exception.
128      * @param SQLState an XOPEN or SQL:2003 code identifying the exception
129      * @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
130      * the cause is non-existent or unknown.
131      * @since 1.6
132      */

133     public SQLTransientConnectionException(String JavaDoc reason, String JavaDoc SQLState, Throwable JavaDoc cause) {
134         super(reason,SQLState,cause);
135     }
136     
137     /**
138      * Constructs a <code>SQLTransientConnectionException</code> object
139      * with a given
140      * <code>reason</code>, <code>SQLState</code>, <code>vendorCode</code>
141      * and <code>cause</code>.
142      * <p>
143      * @param reason a description of the exception
144      * @param SQLState an XOPEN or SQL:2003 code identifying the exception
145      * @param vendorCode a database vendor-specific exception code
146      * @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
147      * the cause is non-existent or unknown.
148      * @since 1.6
149      */

150     public SQLTransientConnectionException(String JavaDoc reason, String JavaDoc SQLState, int vendorCode, Throwable JavaDoc cause) {
151         super(reason,SQLState,vendorCode,cause);
152     }
153   
154     private static final long serialVersionUID = -2520155553543391200L;
155 }
156
Popular Tags