Exceptions pertaining to data access

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.
[Fix Pack 27 or later] The userDefinedErrorMap custom property for data sources overlays existing entries in the error map by invoking the DataStoreHelper.setUserDefinedMap method. The userDefinedErrorMap can be used to add, change, or remove entries from the error map. For example, to remove the mapping of SQLState S1000, add a mapping of error code 1062 to duplicate key, and add a mapping of SQLState 08004 to stale connection, you can specify the following value for userDefinedErrorMap:
"S1000"=;1062=com.ibm.websphere.ce.cm.DuplicateKeyException;"08004"=
com.ibm.websphere.ce.cm.StaleConnectionException
userDefinedErrorMap can be located in the administrative console by selecting the data source and configuring the custom properties.



Subtopics
Stale connections
Example: Handling data access exception - ConnectionWaitTimeoutException (for the JDBC API)
Example: Handling data access exception - ConnectionWaitTimeoutException (for J2EE Connector Architecture)
Example: Handling data access exception - error mapping in DataStoreHelper
Database deadlock and foreign key conflicts
Related concepts
Data sources
Resource adapters
Related reference
Connection considerations when migrating servlets, JavaServer Pages, or enterprise session beans
JDBC trace configuration
Connection pool settings
Connection pool (Version 4) settings
Concept topic Concept topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 12:02:36 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-zos&topic=daexcp
File name: cdat_daexcp.html