Marco,
***Note***
When the TOracleEvent component creates its copy of the OracleSession, it doesn't (currently) copy the state of the SQLTrace property!!! If you want to enable tracing in you're OracleEvent calls, you (currently) have to hack the code to do so.
Please add a request to modify this in the next release. If you want the specific code changes, I can give them to you.
***End Note***
I checked the logs and found out the ORA-03113 error was being generated because the session was getting blown away when I was starting the TOracleEvent component.
My program flow was: 1) Grab server, userID and password from encrypted registry entries (or use default values), 2) Open the session, 3) Open a bunch of lookup tables and an initial set of master>detail>detail data tables, 4) execute the OracleEvent component which watches for Alerts that the lookup tables have been updated (causes a refresh).
This was causing an error on the Oracle side, crashing the session. I added a 500ms delay between steps 3 and 4 and that worked around that particuliar problem.
The logs show the alerts registering fine now and firing ok.
My current problem is during the shutdown. Before I close the DataModule which contains the DOA components, I'm calling a routine that logs the user out of my application. This modifies the security table to show that the user has logged out. This fires an Alert to which the OracleEvent component responds.
After logging out the user, the DataModule is freed which stops and frees the OracleEvent component, closes all the Datasets and closes the session.
I'm currently getting Access Violations. I've traced into the code and the cause appears to be that the final event is still being processed when the OracleEvent component is freed. When the AlertLoop returns from processing the AlertDoOnEvent, Ready is False, because the thread wasn't terminated when the last event fired so the loop repeats, but, the main thread has already freed the components, so when the AlertLoop tries to access the Event.Query component, it's generating the AV.
I'll try to generate a short code block to send that illustrates the problem, and see if I can come up with a proposed solution or work-around.
Michael