Subject | Re: Using FbStatisticsManager to getHeaderPage() will not timeout |
---|---|
Author | jon.reckner |
Post date | 2008-07-31T13:37:31Z |
Thank you for your quick reply I appreciate that greatly.
Running gsec from the command line while the database is down
immediately responds back to me with:
gsec version WI-V2.0.3.12981 Firebird 2.0
Cannot attach to services manager
unable to open database
Running gstat.exe from command line will print my header I assume
because the database file is local and available but it will also
show me the database is unavailable as the last part of the header:
unavailable database
I suppose I could change my design here a bit and attempt to verify
the database is online before attempting to get its headerPage to
avoid asking for the header when teh database is offline.
What is the best way to verify the database is online? I am hoping I
dont need to make a full connection to determine this.
--- In Firebird-Java@yahoogroups.com, Roman Rokytskyy <roman@...>
wrote:
Running gsec from the command line while the database is down
immediately responds back to me with:
gsec version WI-V2.0.3.12981 Firebird 2.0
Cannot attach to services manager
unable to open database
Running gstat.exe from command line will print my header I assume
because the database file is local and available but it will also
show me the database is unavailable as the last part of the header:
unavailable database
I suppose I could change my design here a bit and attempt to verify
the database is online before attempting to get its headerPage to
avoid asking for the header when teh database is offline.
What is the best way to verify the database is online? I am hoping I
dont need to make a full connection to determine this.
--- In Firebird-Java@yahoogroups.com, Roman Rokytskyy <roman@...>
wrote:
>Firebird
> > I am using FbStatisticsManager to get the header page from a
> > database and all works well as long as the database is online,however
> > if the database is shutdown completely there does not seem to bea
> > timeout for this request qhich causes my application to hangafter
> > indefinately. Is there a way to configure this class to timeout
> > so many seconds?protocol
>
> No, there is no such possibility. One could add this on the
> level, but it would simply close the socket connection - this isnot the
> best behavior with the server.hang, but
>
> I think that better solution would be to fix the server not to
> return an error instead, if this is the case... What is thebehavior of
> the command line tool gsec when you connect via services API?
>
> Roman
>