Oracle® Objects for OLE Developer's Guide 10g Release 1 (10.1) Part Number B10118-01 |
|
See Also |
Example |
Description
Registers the application's Failover Notification Handler.
Usage
OraDatabase.MonitorForFailover FOSink, FOCtx
Arguments |
Description |
---|---|
[in] FOSink |
An IDispatch interface implementing the OnFailover method which is notified in event of a failover |
[in] FOCtx |
Context-specific information that the application wants passed into OnFailover in event of a failover |
To receive Failover notifications, a notification handler must be registered with MonitorForFailover. The notification handler must be an automation object (Class module in VB) that implements the OnFailover method.
The syntax of the method is:
Public Function OnFailover(Ctx As Variant, fo_type As Variant,fo_event as Variant, fo_OraDB as Variant)
Where |
Is |
---|---|
[in] Ctx |
Passed into MonitorForFailover by the application. Context-sensitive information that the application wants passed in event of a failover |
[in] fo_type |
Failover type. This is the type of failover that the client has requested. The usual values are: · OO4O_FO_SESSION, which indicates that the user has requested only session failover. · OO4O_FO_SELECT, which indicates that the user has requested select failover as well. |
[in] fo_event |
Failover event. This indicates the state of the failover. It has several possible values: · OO4O_FO_BEGIN indicates that failover has detected a lost connection and failover is starting. · OO4O_FO_END indicates successful completion of failover. · OO4O_FO_ABORT indicates that failover was unsuccessful, and there is no option of retrying. · OO4O_FO_ERROR also indicates that failover was unsuccessful, but it gives the application the opportunity to handle the error and retry failover. The application can retry failover, by programming the OnFailover method to return OO4O_FO_RETRY. · OO4O_FO_REAUTH indicates that a user handle has been reauthenticated. This applies to the situation where a client has multiple user sessions on a single server connection. During the initial failover, only the active user session is failed over. Other sessions are failed over when the application tries to use them. This is the value passed to the callback during these subsequent failovers. |
[in] fo_OraDB |
This is the OraDatabase of the user-session that is being failed over. Valid only when fo_event is OO4O_FO_REAUTH. |