src/java.sql/share/classes/java/sql/SQLTransientConnectionException.java
author herrick
Wed, 20 Nov 2019 10:17:37 -0500
branchJDK-8200758-branch
changeset 59160 e90068e7afa1
parent 47216 71c04702a3d5
permissions -rw-r--r--
JDK-8234402: revert change that stopped providing JPackageToolProvider Reviewed-by: asemenyuk, almatvee, kcr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
23010
6dadb192ad81 8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents: 21278
diff changeset
     2
 * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package java.sql;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 * The subclass of {@link SQLException} for the SQLState class
6528
06df0b8bf209 6861385: Updated SQLException subclasses to clarify that they may be thrown for vendor specific conditions
lancea
parents: 5506
diff changeset
    30
 * value '<i>08</i>', or under vendor-specified conditions.  This indicates
06df0b8bf209 6861385: Updated SQLException subclasses to clarify that they may be thrown for vendor specific conditions
lancea
parents: 5506
diff changeset
    31
 * that the connection operation that failed might be able to succeed if
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * the operation is retried without any application-level changes.
6528
06df0b8bf209 6861385: Updated SQLException subclasses to clarify that they may be thrown for vendor specific conditions
lancea
parents: 5506
diff changeset
    33
 * <p>
06df0b8bf209 6861385: Updated SQLException subclasses to clarify that they may be thrown for vendor specific conditions
lancea
parents: 5506
diff changeset
    34
 * Please consult your driver vendor documentation for the vendor-specified
06df0b8bf209 6861385: Updated SQLException subclasses to clarify that they may be thrown for vendor specific conditions
lancea
parents: 5506
diff changeset
    35
 * conditions for which this <code>Exception</code> may be thrown.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
public class SQLTransientConnectionException extends java.sql.SQLTransientException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
         * Constructs a <code>SQLTransientConnectionException</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
         * The <code>reason</code>, <code>SQLState</code> are initialized
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
         * to <code>null</code> and the vendor code is initialized to 0.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
         *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
         * The <code>cause</code> is not initialized, and may subsequently be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
         * initialized by a call to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
         * {@link Throwable#initCause(java.lang.Throwable)} method.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
    48
         *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
         * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
        public SQLTransientConnectionException() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
                super();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
         * Constructs a <code>SQLTransientConnectionException</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
         * with a given <code>reason</code>. The <code>SQLState</code>
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 6531
diff changeset
    58
         * is initialized to <code>null</code> and the vendor code is initialized
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
         * to 0.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
         *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
         * The <code>cause</code> is not initialized, and may subsequently be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
         * initialized by a call to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
         * {@link Throwable#initCause(java.lang.Throwable)} method.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
    64
         *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
         * @param reason a description of the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
         * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
        public SQLTransientConnectionException(String reason) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
                super(reason);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
         * Constructs a <code>SQLTransientConnectionException</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
         * with a given <code>reason</code> and <code>SQLState</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
         *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
         * The <code>cause</code> is not initialized, and may subsequently be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
         * initialized by a call to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
         * {@link Throwable#initCause(java.lang.Throwable)} method. The vendor code
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
         * is initialized to 0.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
    80
         *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
         * @param reason a description of the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
         * @param SQLState an XOPEN or SQL:2003 code identifying the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
         * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
        public SQLTransientConnectionException(String reason, String SQLState) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
                super(reason,SQLState);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
         * Constructs a <code>SQLTransientConnectionException</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
         * with a given <code>reason</code>, <code>SQLState</code>  and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
         * <code>vendorCode</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
         *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
         * The <code>cause</code> is not initialized, and may subsequently be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
         * initialized by a call to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
         * {@link Throwable#initCause(java.lang.Throwable)} method.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
    97
         *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
         * @param reason a description of the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
         * @param SQLState an XOPEN or SQL:2003 code identifying the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
         * @param vendorCode a database vendor specific exception code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
         * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
        public SQLTransientConnectionException(String reason, String SQLState, int vendorCode) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
                super(reason,SQLState,vendorCode);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
     * Constructs a <code>SQLTransientConnectionException</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     * with a given  <code>cause</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     * The <code>SQLState</code> is initialized
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
     * to <code>null</code> and the vendor code is initialized to 0.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
     * The <code>reason</code>  is initialized to <code>null</code> if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
     * <code>cause==null</code> or to <code>cause.toString()</code> if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
     * <code>cause!=null</code>.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
   115
     *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
     *     the cause is non-existent or unknown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
    public SQLTransientConnectionException(Throwable cause) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
        super(cause);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
     * Constructs a <code>SQLTransientConnectionException</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
     * with a given
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
     * <code>reason</code> and  <code>cause</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
     * The <code>SQLState</code> is  initialized to <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
     * and the vendor code is initialized to 0.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
   130
     *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
     * @param reason a description of the exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
     *     the cause is non-existent or unknown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
    public SQLTransientConnectionException(String reason, Throwable cause) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
        super(reason,cause);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
     * Constructs a <code>SQLTransientConnectionException</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
     * with a given
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
     * <code>reason</code>, <code>SQLState</code> and  <code>cause</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
     * The vendor code is initialized to 0.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
   145
     *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * @param reason a description of the exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * @param SQLState an XOPEN or SQL:2003 code identifying the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     *     the cause is non-existent or unknown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    public SQLTransientConnectionException(String reason, String SQLState, Throwable cause) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        super(reason,SQLState,cause);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
     *  Constructs a <code>SQLTransientConnectionException</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     * with a given
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
     * <code>reason</code>, <code>SQLState</code>, <code>vendorCode</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     * and  <code>cause</code>.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
   161
     *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     * @param reason a description of the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     * @param SQLState an XOPEN or SQL:2003 code identifying the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     * @param vendorCode a database vendor-specific exception code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     *     the cause is non-existent or unknown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    public SQLTransientConnectionException(String reason, String SQLState, int vendorCode, Throwable cause) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
        super(reason,SQLState,vendorCode,cause);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
    private static final long serialVersionUID = -2520155553543391200L;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
}