Subject | Connection Lost in a TThread and NT Service, exception handling |
---|---|
Author | Arno Garrels |
Post date | 2002-11-05T08:07:26Z |
Hi,
NT Service with IBO in a worker TThread.
I just want to terminate a worker thread when IB connection was lost and/or
an ISC exception was raised.
It works fine when I raise my own test exceptions but after the onPost error
exception for example I end up in procedure:
TIB_Connection.FreeStmtHandleCache
where I get alot of exceptions with message 'This is a potential problem
Errno: 335544721' until application either terminates or keeps hanging in
the worker thread.
DB stuff runs in a try finally block. Finally is the last job in execute
method where database/datasets are closed, datamodule is freed and a
ThreadMessage is posted to the service thread, in it's handler I do WaitFor
and free the worker thread.
I use IBODataset components with AutoCommit enabled, Protocol TCP/IP.
What am I missing?
Thanks
Arno Garrels
NT Service with IBO in a worker TThread.
I just want to terminate a worker thread when IB connection was lost and/or
an ISC exception was raised.
It works fine when I raise my own test exceptions but after the onPost error
exception for example I end up in procedure:
TIB_Connection.FreeStmtHandleCache
where I get alot of exceptions with message 'This is a potential problem
Errno: 335544721' until application either terminates or keeps hanging in
the worker thread.
DB stuff runs in a try finally block. Finally is the last job in execute
method where database/datasets are closed, datamodule is freed and a
ThreadMessage is posted to the service thread, in it's handler I do WaitFor
and free the worker thread.
I use IBODataset components with AutoCommit enabled, Protocol TCP/IP.
What am I missing?
Thanks
Arno Garrels