Start Method (int, int)

Starts the listener for receiving dependency change notifications from the instance of ORACLE specified by the connection string.


public void Start(int timeOut = 120, int watchDogTimeOut = 180)


Type: System.Int32 (Optional)
Specify the amount of time in seconds the listener must wait for a notification before start a new request.

Type: System.Int32 (Optional)
Specify the amount of time in seconds for the watch dog.


It is good practice is to wrap OracleTableDependency within a using statement or, alternatively, call the Stop() method once we do not need any more notifications. So, when the application will not disconnect abruptly, this approach is enough to remove the OracleTableDependency infrastructure (Trigger, Service Broker service, the queue, Contract, Messages type and Stored Procedure).

However, when the application exits abruptly – that is not calling the Stop() method or not implementing the using statement - we need a way for cleaning up the OracleTableDependency infrastructure. The Start() method, has watchDogTimeOut optional parameter used to remove all the database objects. Its default value is 180 seconds: after this amount of time, if there are no listeners waiting for notifications, the OracleTableDependency infrastructure will be removed. This time seems long enough. Or not?

There is one very common scenario that results in much more time: debugging. When you develop applications, you often spend several minutes inside the debugger before you move on. So please be careful when you debug an application that the value assigned to watchDogTimeOut parameter is long enough, otherwise you will incur in a destruction of database objects in the middle of you debug activity.

Last edited Sep 10, 2015 at 6:48 PM by delbianco, version 4