The scenario is that the Oracle database has an invalid trigger associated to the Logoff event. Although there are compilation errors, they are treated as warnings and will allow the trigger to be executed.
It's expected that when the application closes the database connection, the trigger will be fired, and the application can continue on with it's processing. However, what is happening is after a certain amount of time (approximately 5 minutes) a Microsoft dialog box pops up stating that an unhandled exception occurred and will need to shut down the application.
Debugging revealed the following stack trace:
Code: Select all
at a.a.b.b()
at CoreLab.Oracle.OracleInternalConnection.a(Boolean A_0)
at CoreLab.Common.DbConnectionPoolGroup.b(Object A_0)
at CoreLab.Common.DbConnectionPool.RemoveObject(Object connection)
at CoreLab.Common.DbConnectionPoolGroup.a(DbConnectionPool A_0)
at CoreLab.Common.DbConnectionPoolGroup.a(Object A_0)
at System.Threading._TimerCallback.TimerCallback_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._TimerCallback.PerformTimerCallback(Object state)
1) create a trigger with the following body:
Code: Select all
create or replace TRIGGER TRIGGER1
BEFORE LOGOFF ON DATABASE
BEGIN
This_proc_doesnt_exist;
END;
It appears that the CoreLab calls a thread to perform the disconnect and doesn't handle the exception that is thrown by the invalid trigger.
I'm using the following:
OraDirect .Net 3.20.7.0
Oracle 10g Standard Edition
Microsoft Framework .Net 2.0
Windows XP Professional SP2