Subject | Re: [IBO] Re: forceClosed of tIBOTransaction |
---|---|
Author | Geoff Worboys |
Post date | 2014-11-07T08:26:42Z |
Just to add to what SET already posted ...
Your suggestion seems more applicable to the connection rather
than the transaction. If the server crashes, is cut-off or
whatever, then you lose the entire connection, not just one
transaction. I don't think I've ever lost just one transaction
without losing the entire connection.
IBO does have some "lost connection" checking, see the
connection "ConnectionWasLost" property.
But it would not be usual to pretend a connection was lost
after a time-out ... and this makes me wonder whether what you
might be asking after is something like the transaction Pause
and Resume processing that is already available.
I added transaction pausing to cope with users going to lunch
(or whatever) while while transactions were still active.
If this sounds more like what you're after, take a look at the
Tutorials directory for the TransactionPausing example in the
source distribution - it's pretty old, but there's a help file
in there that tries to explain it in more detail.
Hmmm ... I just realised you were asking about TIBOTransaciton
and I haven't tried Pause/Resume in that situation. You'd
have to experiment.
But if you really are looking to check for when the last API
activity took place, you could try hooking into the same place
that the TIB_Monitor hooks into - so you can track when the
most recent API calls took place. Something like this would
let you force a connection closed after an API idle time ...
as opposed to an application idle time which is a Delphi
question rather than an IBO question.
--
Geoff Worboys
Telesis Computing Pty Ltd
avert@... [IBObjects] wrote:
Your suggestion seems more applicable to the connection rather
than the transaction. If the server crashes, is cut-off or
whatever, then you lose the entire connection, not just one
transaction. I don't think I've ever lost just one transaction
without losing the entire connection.
IBO does have some "lost connection" checking, see the
connection "ConnectionWasLost" property.
But it would not be usual to pretend a connection was lost
after a time-out ... and this makes me wonder whether what you
might be asking after is something like the transaction Pause
and Resume processing that is already available.
I added transaction pausing to cope with users going to lunch
(or whatever) while while transactions were still active.
If this sounds more like what you're after, take a look at the
Tutorials directory for the TransactionPausing example in the
source distribution - it's pretty old, but there's a help file
in there that tries to explain it in more detail.
Hmmm ... I just realised you were asking about TIBOTransaciton
and I haven't tried Pause/Resume in that situation. You'd
have to experiment.
But if you really are looking to check for when the last API
activity took place, you could try hooking into the same place
that the TIB_Monitor hooks into - so you can track when the
most recent API calls took place. Something like this would
let you force a connection closed after an API idle time ...
as opposed to an application idle time which is a Delphi
question rather than an IBO question.
--
Geoff Worboys
Telesis Computing Pty Ltd
avert@... [IBObjects] wrote:
> Hi Jason--
> Thank-you for the reply.
> A suggestion, sure.... I was more hoping there was a way to do it now ;)
> Something like "ForceClosedOnIdle"
> That way, once the transaction has gone idle, the timer for 'forceclosed' starts.
> Again, what i'm trying to do is, close 'orphaned' transactions
> because the session that had that transaction open has
> died/crashed/lost contact/someone shut off that computer/etc.
> regards