All enterprise bean container-managed persistence (CMP) beans under the
EJB 2.x specification receive a standard EJB exception when an operation fails.
JDBC applications receive a standard SQL exception if any JDBC operation
fails.
The product provides special exceptions for its relational resource adapter
(RRA), to indicate that the connection currently held is no longer valid.
- The ConnectionWaitTimeout exception indicates that the
application has waited for the number of seconds specified by the connection
timeout setting and has not received a connection. This situation can occur
when the pool is at maximum size and all of the connections are in use by
other applications for the duration of the wait. In addition, there are no
connections currently in use that the application can share because either
the connection properties do not match, or the connection is in a different
transaction.
For a Version 4.0 data source, the ConnectionWaitTimeout object
creates an exception that is instantiated from the com.ibm.ejs.cm.pool.ConnectionWaitTimeoutException class.
For
J2C connection factories, the ConnectionWaitTimeout object
generates a resource exception of the com.ibm.websphere.ce.j2c.ConnectionWaitTimeoutException class.
Later
version data sources issue an SQL exception of the com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException subclass.
- The StaleConnection exception indicates that the connection
is no longer valid. Read Stale connections for more
information on this type of exception.