Skip Headers

# Configuring the Integrity Checker

Previous

Next

When you log into a session, TopLink initializes and validates the descriptors you registered with it. By configuring the integrity checker, you can customize this validation process to do the following:

- Check Database

- Catch All Exceptions

- Catch Instantiation Policy Exceptions

Table: Session Support for Checking Descriptor Integrity summarizes which sessions support descriptor integrity checking configuration.

Session Support for Checking Descriptor Integrity

Session | Using TopLink Workbench | Using Java
--- | --- | ---
Server and Client Sessions |  |
Session Broker and Client Sessions |  |
Database Sessions |  |

Check Database

The `IntegrityChecker` method `setShouldCheckDatabase` specifies whether or not the integrity checker should verify the descriptor's metadata against the database metadata. This will report any errors due to missing or incorrect table or fields specified in the descriptors. This is turned off by default as it adds a significant overhead to connecting a session.

Catch All Exceptions

By default, the integrity checker catches all exceptions that occur during initialization, and throws a single exception at the end of initialization reporting all of the errors detected. If you only want the first exception encountered, you can disable this feature using `IntegrityChecker` method `setShouldCatchExceptions(false)`.

Catch Instantiation Policy Exceptions

By default, the integrity checker tests the default or configured constructor for each descriptor initialized in the session. To disable this feature, use `IntegrityChecker` method `setShouldCheckInstantiationPolicy(false)`.