Subject Re: [IBO] IB_Events question
Author Hans Hoogstraat
Cached updates must be all turned off in your applications. Very easy to
turn one on accidentally. Could that be a possible reason for some of your
unexpected delayed updates ??


----- Original Message -----
From: "Jason Wharton" <jwharton@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, November 24, 2004 11:55 AM
Subject: RE: [IBO] IB_Events question


|
| I guess this didn't actually answer your question...
|
| The short answer to your question is no. You would have to have your
| application manage validating the connection. You could use a TTimer with
a
| high interval setting.
|
| Jason Wharton
|
|
| > -----Original Message-----
| > From: Jason Wharton [mailto:jwharton@...]
| > Sent: Tuesday, November 23, 2004 11:28 PM
| > To: IBObjects@yahoogroups.com
| > Subject: RE: [IBO] IB_Events question
| >
| >
| >
| > Daniel,
| >
| > My IBS_Base.pas/dfm is a TServiceApp that essentially works
| > just like this.
| > I really need to develop the documentation on this more than
| > I have, but it
| > sounds ideal for what you are trying to accomplish.
| >
| > Essentially, the service app goes to sleep and every so often
| > it wakes up
| > and checks the connection to the database to see if it is
| > still alive. If
| > not, then it attempts to deal with it and then goes back to
| > sleep if it
| > succeeds or fails. When it wakes up it tries to establish or
| > verify the
| > connection again. I use about a 2 to 10 minute sleep interval.
| >
| > Of course, if your connection is good and the AST of the
| > event is triggered
| > then it hits the OnWakeUp event and the service app is jolted
| > from its nap
| > and it immediately goes to work finding out who woke it up
| > and it does its
| > thing and goes back to sleep. The service control thread
| > also performs a
| > wakeup so that it can tidy up and close on a shutdown or stop request.
| >
| > This service app module is designed to serve as a base class
| > with protected
| > virtual methods that can be overridden to have the relevant
| > functionality
| > plugged into them. There is a lot of the groundwork already
| > laid, like
| > providing the worker thread, logging to a text file is easy,
| > sending off an
| > email notification (well, I've got some issues here to deal
| > with since they
| > changed from NM to Indy), and the sleep stuff, etc. is all pretty well
| > provided in a framework.
| >
| > Hope this helps explain to some extent how this works.
| >
| > Jason Wharton
| > www.ibobjects.com
| >
| >
| > > -----Original Message-----
| > > From: Daniel Jimenez [mailto:d.jimenez@...]
| > > Sent: Tuesday, November 23, 2004 7:56 PM
| > > To: IBObjects@yahoogroups.com
| > > Subject: [IBO] IB_Events question
| > >
| > >
| > >
| > > Hi,
| > >
| > > I am about to modify an application, so that it will make use
| > > of "Events"
| > > triggered by the Firebird DB. Thus, I will make use of
| > > IB_Events. However, I
| > > am concerned about a few things.
| > >
| > > 1. Is there a component within IBObjects which works as a
| > > "WatchDog" that
| > > is, we can monitor the connection to the DB, so that if we loose the
| > > connection to the Database, the watchdog will see this and
| > > reconnect, or
| > > trigger an even in the application so that it can reconnect
| > > to the DB. The
| > > reason for this, is that I would like to have the IB_Events setup as
| > > passive.
| > >
| > > Thanks
| > >
| > > danieL.
|
|
|
|
|
___________________________________________________________________________
| IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
| without the need for BDE, ODBC or any other layer.
|
___________________________________________________________________________
| http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
| keyword-searchable FAQ, community code contributions and more !
| Yahoo! Groups Links
|
|
|
|
|
|
|