|Oracle9i OLAP Services Developer's Guide to the Oracle OLAP API
Release 1 (9.0.1)
Part Number A88756-01
Connecting to a Data Store, 6 of 6
If an OLAP API method is taking too long to execute, and it is acceptable for your application to break off its connection with the OLAP service, you can use the
interrupt method on
ConnectionInterrupter. Terminating a connection in this way is not a routine procedure, and you should use it only under extraordinary circumstances.
Typically, an application runs in a thread that establishes a connection and executes queries. Your application must prepare for using the
interrupt method by creating a second thread for interrupting the connection. The second thread waits for notification by the first thread that an interruption is needed.
When the first thread tells the second thread to terminate the connection, the second thread does the following:
getRemoteStubmethod on the
Connectionobject that represents the connection to be interrupted. The method returns the CORBA stub for the
ConnectionInterrupter, specifying the CORBA stub for the
Connectionas a parameter.
interruptmethod on the new
ConnectionInterrupterto terminate the connection.