Oracle9i OLAP Services Developer's Guide to the Oracle OLAP API
Release 1 (9.0.1)

Part Number A88756-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Connecting to a Data Store, 6 of 6


Interrupting a Connection

When to interrupt a connection

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.

Preparing to use the interrupt method

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.

Using the interrupt method

When the first thread tells the second thread to terminate the connection, the second thread does the following:

  1. Calls the getRemoteStub method on the Connection object that represents the connection to be interrupted. The method returns the CORBA stub for the Connection.

  2. Uses the constructor to create a new ConnectionInterrupter, specifying the CORBA stub for the Connection as a parameter.

  3. Calls the interrupt method on the new ConnectionInterrupter to terminate the connection.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table of Contents
Contents
Go To Index
Index

Master Index

Feedback