Skip to content

Commit

Permalink
Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Aug 12, 2024
1 parent 0752fd0 commit 651c925
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
10 changes: 5 additions & 5 deletions src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ public int getDefaultTransactionIsolation() {
}

/**
* Gets the set of SQL_STATE codes considered to signal fatal conditions.
* Gets the set of SQL State codes considered to signal fatal conditions.
*
* @return fatal disconnection state codes
* @see #setDisconnectionSqlCodes(Collection)
Expand Down Expand Up @@ -950,7 +950,7 @@ public synchronized String getEvictionPolicyClassName() {

/**
* True means that validation will fail immediately for connections that have previously thrown SQLExceptions with
* SQL_STATE indicating fatal disconnection errors.
* SQL State indicating fatal disconnection errors.
*
* @return true if connections created by this datasource will fast fail validation.
* @see #setDisconnectionSqlCodes(Collection)
Expand Down Expand Up @@ -1945,11 +1945,11 @@ public void setDefaultTransactionIsolation(final int defaultTransactionIsolation
}

/**
* Sets the SQL_STATE codes considered to signal fatal conditions.
* Sets the SQL State codes considered to signal fatal conditions.
* <p>
* Overrides the defaults in {@link Utils#getDisconnectionSqlCodes()} (plus anything starting with
* {@link Utils#DISCONNECTION_SQL_CODE_PREFIX}). If this property is non-null and {@link #getFastFailValidation()}
* is {@code true}, whenever connections created by this datasource generate exceptions with SQL_STATE codes in this
* is {@code true}, whenever connections created by this datasource generate exceptions with SQL State codes in this
* list, they will be marked as "fatally disconnected" and subsequent validations will fail fast (no attempt at
* isValid or validation query).
* </p>
Expand All @@ -1962,7 +1962,7 @@ public void setDefaultTransactionIsolation(final int defaultTransactionIsolation
* setLoginTimeout, getLoginTimeout, getLogWriter}.
* </p>
*
* @param disconnectionSqlCodes SQL_STATE codes considered to signal fatal conditions
* @param disconnectionSqlCodes SQL State codes considered to signal fatal conditions
* @since 2.1
*/
public void setDisconnectionSqlCodes(final Collection<String> disconnectionSqlCodes) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme
private boolean fatalSqlExceptionThrown;

/**
* SQL_STATE codes considered to signal fatal conditions. Overrides the defaults in
* SQL State codes considered to signal fatal conditions. Overrides the defaults in
* {@link Utils#getDisconnectionSqlCodes()} (plus anything starting with {@link Utils#DISCONNECTION_SQL_CODE_PREFIX}).
*/
private final Collection<String> disconnectionSqlCodes;
Expand Down Expand Up @@ -104,7 +104,7 @@ public PoolableConnection(final Connection conn, final ObjectPool<PoolableConnec
* @param jmxObjectName
* JMX name
* @param disconnectSqlCodes
* SQL_STATE codes considered fatal disconnection errors
* SQL State codes considered fatal disconnection errors
* @param fastFailValidation
* true means fatal disconnection errors cause subsequent validations to fail immediately (no attempt to
* run query or isValid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,19 +271,19 @@ public int getDefaultTransactionIsolation() {
}

/**
* SQL_STATE codes considered to signal fatal conditions.
* SQL State codes considered to signal fatal conditions.
* <p>
* Overrides the defaults in {@link Utils#getDisconnectionSqlCodes()} (plus anything starting with
* {@link Utils#DISCONNECTION_SQL_CODE_PREFIX}). If this property is non-null and {@link #isFastFailValidation()} is
* {@code true}, whenever connections created by this factory generate exceptions with SQL_STATE codes in this list,
* {@code true}, whenever connections created by this factory generate exceptions with SQL State codes in this list,
* they will be marked as "fatally disconnected" and subsequent validations will fail fast (no attempt at isValid or
* validation query).
* </p>
* <p>
* If {@link #isFastFailValidation()} is {@code false} setting this property has no effect.
* </p>
*
* @return SQL_STATE codes overriding defaults
* @return SQL State codes overriding defaults
* @since 2.1
*/
public Collection<String> getDisconnectionSqlCodes() {
Expand Down Expand Up @@ -391,7 +391,7 @@ public boolean isEnableAutoCommitOnReturn() {

/**
* True means that validation will fail immediately for connections that have previously thrown SQLExceptions with
* SQL_STATE indicating fatal disconnection errors.
* SQL State indicating fatal disconnection errors.
*
* @return true if connections created by this factory will fast fail validation.
* @see #setDisconnectionSqlCodes(Collection)
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/apache/commons/dbcp2/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public final class Utils {
@Deprecated
public static final boolean IS_SECURITY_ENABLED = isSecurityEnabled();

/** Any SQL_STATE starting with this value is considered a fatal disconnect */
/**
* Any SQL State starting with this value is considered a fatal disconnect.
*/
public static final String DISCONNECTION_SQL_CODE_PREFIX = "08";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public PoolableManagedConnection(final TransactionRegistry transactionRegistry,
* @param pool
* connection pool
* @param disconnectSqlCodes
* SQL_STATE codes considered fatal disconnection errors
* SQL State codes considered fatal disconnection errors
* @param fastFailValidation
* true means fatal disconnection errors cause subsequent validations to fail immediately (no attempt to
* run query or isValid)
Expand Down

0 comments on commit 651c925

Please sign in to comment.