Skip Headers
Oracle® TopLink Developer's Guide
10g (10.1.3.1.0)
B28218-01
  Go To Documentation Library
Library
Go To Product List
Product
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

Configuring Query Timeout at the Descriptor Level

You can specify how the TopLink runtime handles the duration of queries on a descriptor's reference class. Specifying a query timeout at the descriptor level applies to all queries on the descriptor's reference class. A query timeout ensures that your application does not block forever over a hung or lengthy query that does not return in a timely fashion.

Table 25-4 summarizes which descriptors support query timeout configuration.

Table 25-9 Descriptor Support for Cache Refresh

Descriptor Using TopLink Workbench
Using Java

Relational DescriptorsFoot 1 

Supported.


Supported.


Object-Relational Descriptors

Unsupported.


Supported.


EIS Descriptor

Unsupported.


Unsupported.


XML Descriptors

Unsupported.


Unsupported.



Footnote 1 Relational class descriptors only (see "Relational Class Descriptors").

You can also configure a timeout on a per-query basis. For more information, see the following:

Using TopLink Workbench

To configure how TopLink handles the duration of queries to this descriptor, use this procedure:

  1. Select a descriptor in the Navigator. Its properties appear in the Editor.

  2. Click the Queries tab. The Queries tab appears.

  3. Click the Settings tab. The Settings tab appears.

    Figure 25-20 Descriptor Queries Settings Tab, Query Timeout Options

    Description of Figure 25-20 follows
    Description of "Figure 25-20 Descriptor Queries Settings Tab, Query Timeout Options"

Use the following table to enter data in the fields on the descriptor's Settings tab to specify how TopLink handles query duration:

Field Description
Default Timeout TopLink throws a DatabaseException if a query on this descriptor does not return within the timeout period you configure on the parent descriptor. If there is no parent descriptor, the query timeout defaults to No Timeout.
No Timeout TopLink blocks until a query on this descriptor returns.
Timeout Enter the timeout period in seconds. TopLink throws a DatabaseException if a query on this descriptor does not return within this time.

Using Java

Use DescriptorQueryManager method setQueryTimeout passing in the timeout value as a number of milliseconds.