public class SQLExceptionFactory40 extends SQLExceptionFactory
Constructor and Description |
---|
SQLExceptionFactory40() |
Modifier and Type | Method and Description |
---|---|
java.sql.SQLException |
getSQLException(java.lang.String message,
java.lang.String messageId,
java.sql.SQLException next,
int severity,
java.lang.Throwable t,
java.lang.Object[] args)
overwrites super class method to create JDBC4 exceptions
SQLSTATE CLASS (prefix) Exception
0A java.sql.SQLFeatureNotSupportedException
08 java.sql.SQLNonTransientConnectionException
22 java.sql.SQLDataException
28 java.sql.SQLInvalidAuthorizationSpecException
40 java.sql.SQLTransactionRollbackException
42 java.sql.SQLSyntaxErrorException
Note the following divergence from JDBC3 behavior: When running
a JDBC3 client, we return EmbedSQLException.
|
private java.sql.SQLException |
wrapArgsForTransportAcrossDRDA(java.lang.String message,
java.lang.String messageId,
java.sql.SQLException next,
int severity,
java.lang.Throwable t,
java.lang.Object[] args)
The following method helps handle DERBY-1178.
|
getArgumentFerry, getSQLException
public java.sql.SQLException getSQLException(java.lang.String message, java.lang.String messageId, java.sql.SQLException next, int severity, java.lang.Throwable t, java.lang.Object[] args)
getSQLException
in interface ExceptionFactory
getSQLException
in class SQLExceptionFactory
message
- the exception messagemessageId
- the message idnext
- the next SQLExceptionseverity
- the severity of the exceptiont
- the cause of the exceptionargs
- the message argumentsprivate java.sql.SQLException wrapArgsForTransportAcrossDRDA(java.lang.String message, java.lang.String messageId, java.sql.SQLException next, int severity, java.lang.Throwable t, java.lang.Object[] args)
The following method helps handle DERBY-1178. The problem is that we may need to serialize our final SQLException across the DRDA network layer. That serialization involves some clever encoding of the Derby messageID and arguments. Unfortunately, once we create one of the JDBC4-specific subclasses of SQLException, we lose the messageID and args. This method creates a dummy EmbedSQLException which preserves that information. We return the dummy exception.
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.