equal
deleted
inserted
replaced
30 * previously failed operation might be able to succeed if the application performs |
30 * previously failed operation might be able to succeed if the application performs |
31 * some recovery steps and retries the entire transaction or in the case of a |
31 * some recovery steps and retries the entire transaction or in the case of a |
32 * distributed transaction, the transaction branch. At a minimum, |
32 * distributed transaction, the transaction branch. At a minimum, |
33 * the recovery operation must include closing the current connection and getting |
33 * the recovery operation must include closing the current connection and getting |
34 * a new connection. |
34 * a new connection. |
35 *<p> |
|
36 * |
35 * |
37 * @since 1.6 |
36 * @since 1.6 |
38 */ |
37 */ |
39 public class SQLRecoverableException extends java.sql.SQLException { |
38 public class SQLRecoverableException extends java.sql.SQLException { |
40 |
39 |
44 * to <code>null</code> and the vendor code is initialized to 0. |
43 * to <code>null</code> and the vendor code is initialized to 0. |
45 * |
44 * |
46 * The <code>cause</code> is not initialized, and may subsequently be |
45 * The <code>cause</code> is not initialized, and may subsequently be |
47 * initialized by a call to the |
46 * initialized by a call to the |
48 * {@link Throwable#initCause(java.lang.Throwable)} method. |
47 * {@link Throwable#initCause(java.lang.Throwable)} method. |
49 * <p> |
48 * |
50 * @since 1.6 |
49 * @since 1.6 |
51 */ |
50 */ |
52 public SQLRecoverableException() { |
51 public SQLRecoverableException() { |
53 super(); |
52 super(); |
54 } |
53 } |
60 * to 0. |
59 * to 0. |
61 * |
60 * |
62 * The <code>cause</code> is not initialized, and may subsequently be |
61 * The <code>cause</code> is not initialized, and may subsequently be |
63 * initialized by a call to the |
62 * initialized by a call to the |
64 * {@link Throwable#initCause(java.lang.Throwable)} method. |
63 * {@link Throwable#initCause(java.lang.Throwable)} method. |
65 * <p> |
64 * |
66 * @param reason a description of the exception |
65 * @param reason a description of the exception |
67 * @since 1.6 |
66 * @since 1.6 |
68 */ |
67 */ |
69 public SQLRecoverableException(String reason) { |
68 public SQLRecoverableException(String reason) { |
70 super(reason); |
69 super(reason); |
76 * |
75 * |
77 * The <code>cause</code> is not initialized, and may subsequently be |
76 * The <code>cause</code> is not initialized, and may subsequently be |
78 * initialized by a call to the |
77 * initialized by a call to the |
79 * {@link Throwable#initCause(java.lang.Throwable)} method. The vendor code |
78 * {@link Throwable#initCause(java.lang.Throwable)} method. The vendor code |
80 * is initialized to 0. |
79 * is initialized to 0. |
81 * <p> |
80 * |
82 * @param reason a description of the exception |
81 * @param reason a description of the exception |
83 * @param SQLState an XOPEN or SQL:2003 code identifying the exception |
82 * @param SQLState an XOPEN or SQL:2003 code identifying the exception |
84 * @since 1.6 |
83 * @since 1.6 |
85 */ |
84 */ |
86 public SQLRecoverableException(String reason, String SQLState) { |
85 public SQLRecoverableException(String reason, String SQLState) { |
93 * <code>vendorCode</code>. |
92 * <code>vendorCode</code>. |
94 * |
93 * |
95 * The <code>cause</code> is not initialized, and may subsequently be |
94 * The <code>cause</code> is not initialized, and may subsequently be |
96 * initialized by a call to the |
95 * initialized by a call to the |
97 * {@link Throwable#initCause(java.lang.Throwable)} method. |
96 * {@link Throwable#initCause(java.lang.Throwable)} method. |
98 * <p> |
97 * |
99 * @param reason a description of the exception |
98 * @param reason a description of the exception |
100 * @param SQLState an XOPEN or SQL:2003 code identifying the exception |
99 * @param SQLState an XOPEN or SQL:2003 code identifying the exception |
101 * @param vendorCode a database vendor specific exception code |
100 * @param vendorCode a database vendor specific exception code |
102 * @since 1.6 |
101 * @since 1.6 |
103 */ |
102 */ |
111 * The <code>SQLState</code> is initialized |
110 * The <code>SQLState</code> is initialized |
112 * to <code>null</code> and the vendor code is initialized to 0. |
111 * to <code>null</code> and the vendor code is initialized to 0. |
113 * The <code>reason</code> is initialized to <code>null</code> if |
112 * The <code>reason</code> is initialized to <code>null</code> if |
114 * <code>cause==null</code> or to <code>cause.toString()</code> if |
113 * <code>cause==null</code> or to <code>cause.toString()</code> if |
115 * <code>cause!=null</code>. |
114 * <code>cause!=null</code>. |
116 * <p> |
115 * |
117 * @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 |
116 * @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 |
118 * the cause is non-existent or unknown. |
117 * the cause is non-existent or unknown. |
119 * @since 1.6 |
118 * @since 1.6 |
120 */ |
119 */ |
121 public SQLRecoverableException(Throwable cause) { |
120 public SQLRecoverableException(Throwable cause) { |
126 * Constructs a <code>SQLRecoverableException</code> object |
125 * Constructs a <code>SQLRecoverableException</code> object |
127 * with a given |
126 * with a given |
128 * <code>reason</code> and <code>cause</code>. |
127 * <code>reason</code> and <code>cause</code>. |
129 * The <code>SQLState</code> is initialized to <code>null</code> |
128 * The <code>SQLState</code> is initialized to <code>null</code> |
130 * and the vendor code is initialized to 0. |
129 * and the vendor code is initialized to 0. |
131 * <p> |
130 * |
132 * @param reason a description of the exception. |
131 * @param reason a description of the exception. |
133 * @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 |
132 * @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 |
134 * the cause is non-existent or unknown. |
133 * the cause is non-existent or unknown. |
135 * @since 1.6 |
134 * @since 1.6 |
136 */ |
135 */ |
141 /** |
140 /** |
142 * Constructs a <code>SQLRecoverableException</code> object |
141 * Constructs a <code>SQLRecoverableException</code> object |
143 * with a given |
142 * with a given |
144 * <code>reason</code>, <code>SQLState</code> and <code>cause</code>. |
143 * <code>reason</code>, <code>SQLState</code> and <code>cause</code>. |
145 * The vendor code is initialized to 0. |
144 * The vendor code is initialized to 0. |
146 * <p> |
145 * |
147 * @param reason a description of the exception. |
146 * @param reason a description of the exception. |
148 * @param SQLState an XOPEN or SQL:2003 code identifying the exception |
147 * @param SQLState an XOPEN or SQL:2003 code identifying the exception |
149 * @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 |
148 * @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 |
150 * the cause is non-existent or unknown. |
149 * the cause is non-existent or unknown. |
151 * @since 1.6 |
150 * @since 1.6 |
157 /** |
156 /** |
158 * Constructs a <code>SQLRecoverableException</code> object |
157 * Constructs a <code>SQLRecoverableException</code> object |
159 * with a given |
158 * with a given |
160 * <code>reason</code>, <code>SQLState</code>, <code>vendorCode</code> |
159 * <code>reason</code>, <code>SQLState</code>, <code>vendorCode</code> |
161 * and <code>cause</code>. |
160 * and <code>cause</code>. |
162 * <p> |
161 * |
163 * @param reason a description of the exception |
162 * @param reason a description of the exception |
164 * @param SQLState an XOPEN or SQL:2003 code identifying the exception |
163 * @param SQLState an XOPEN or SQL:2003 code identifying the exception |
165 * @param vendorCode a database vendor-specific exception code |
164 * @param vendorCode a database vendor-specific exception code |
166 * @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 |
165 * @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 |
167 * the cause is non-existent or unknown. |
166 * the cause is non-existent or unknown. |