Skip Headers
Oracle TopLink Developer's Guide
10g Release 3 (10.1.3)
B13593-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

Configuring the Integrity Checker

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:

Table 77-15 summarizes which sessions support descriptor integrity checking configuration.

Table 77-15 Session Support for Checking Descriptor Integrity

Session Using TopLink Workbench Using Java

Server and Client Sessions


Unsupported

Supported.


Session Broker and Client Sessions


Unsupported

Supported.


Database Sessions


Unsupported

Supported.



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).

Using Java

As Example 77-9 shows, you can configure the integrity checker validation process.

Example 77-9 Configuring the Integrity Checker

session.getIntegrityChecker().setShouldCheckDatabase(true);
session.getIntegrityChecker().setShouldCatchExceptions(false);
session.getIntegrityChecker().setShouldCheckInstantiationPolicy(false);
session.login();