Oracle TopLink Developer's Guide
10g Release 3 (10.1.3) B13593-01 |
|
![]() Previous |
![]() Next |
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 28-4 summarizes which descriptors support query timeout configuration.
Table 28-9 Descriptor Support for Cache Refresh
Descriptor | Using TopLink Workbench
|
Using Java
|
---|---|---|
Relational DescriptorsFoot 1 |
|
|
Object-Relational Descriptors |
|
|
EIS Descriptor |
|
|
XML Descriptors |
|
|
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:
To configure how TopLink handles the duration of queries to this descriptor, use this procedure:
Select a descriptor in the Navigator. Its properties appear in the Editor.
Click the Settings tab. The Settings tab appears.
Figure 28-20 Descriptor Queries Settings Tab, Query Timeout Options
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.
|
Use DescriptorQueryManager
method setQueryTimeout
passing in the timeout value as a number of milliseconds.