Checking the database availibilty before starting the form

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

sid_nadgeri
Ebase User
Posts: 11
Joined: Thu Oct 16, 2008 11:33 am
Location: Mumbai, Currently in Croydon

Checking the database availibilty before starting the form

#1

Postby sid_nadgeri » Wed Feb 04, 2009 6:10 pm

I wonder if it is possible to check the database availability before starting the ebase form. We have ebase form that connects to database which goes down everyday for backup. I want to show friendly message when user try to access the ebase form.

any ideas appreciated.
0 x

AJDulk
Ebase User
Posts: 94
Joined: Fri Sep 14, 2007 12:18 pm
Location: The Netherlands
Contact:

Checking the database availibilty before starting the form

#2

Postby AJDulk » Thu Feb 05, 2009 11:40 am

Since Ebase uses the Database for nearly everything, you would have to do it outside of Ebase. Since Ebase is based on Java, you could write a Java servlet that checks the database and redirects according to the result.

Regards,
Antony
0 x

sid_nadgeri
Ebase User
Posts: 11
Joined: Thu Oct 16, 2008 11:33 am
Location: Mumbai, Currently in Croydon

Re: Checking the database availibilty before starting the fo

#3

Postby sid_nadgeri » Thu Feb 05, 2009 12:47 pm

AJDulk wrote:Since Ebase uses the Database for nearly everything, you would have to do it outside of Ebase. Since Ebase is based on Java, you could write a Java servlet that checks the database and redirects according to the result.

Regards,
Antony
Hi Antony, thanks for your reply.

However this is one case to avoid the situation if the database is up then direct to actual form or to the other form, I am also looking for the case if suppose user is filling the form during the database (not ebase repository) goes down and when user submits the form he get the error message as DB is down which is also can be handled ny on error script, but we are not capturing the data anywhere.

Just looking for any ideas by which i can store the data temporarily and insert it in database after specific time or schedule something on ebase side. :? :?

Sid
0 x

User avatar
Joost
Ebase User
Posts: 49
Joined: Fri Sep 14, 2007 6:14 pm
Location: The Netherlands

Re: Checking the database availibilty before starting the fo

#4

Postby Joost » Mon Feb 09, 2009 9:21 am

sid_nadgeri wrote:However this is one case to avoid the situation if the database is up then direct to actual form or to the other form, I am also looking for the case if suppose user is filling the form during the database (not Ebase repository) goes down and when user submits the form he get the error message as DB is down which is also can be handled ny on error script, but we are not capturing the data anywhere.
You could check using FPL and if needed create a customfunction. BEA Weblogic contains the dbping command-line utility to tests the connection to a DBMS. I wonder if it can be used by a non-bea application server. But you could ofcourse write something yourself like Antony suggested.

Just looking for any ideas by which i can store the data temporarily and insert it in database after specific time or schedule something on Ebase side.
If $COMMAND_STATUS or $FOUND doesn't contain OK/Y, you may temporarily write the data to a XML file and have the batch scheduler check for and import data from it periodically.
0 x

sid_nadgeri
Ebase User
Posts: 11
Joined: Thu Oct 16, 2008 11:33 am
Location: Mumbai, Currently in Croydon

#5

Postby sid_nadgeri » Mon Feb 09, 2009 4:32 pm

Thanks for the reply.

I have created 1 resource which connects to database with following query

select count(*) from dual

and in the before form event fecthing the db resource and there is no chance to check the value for $COMMAND_STATUS but it will be picked by on error event. I called another form in on error event provided that the error occured in start of the form.

For my second concern if you already filling form and database goes down, I have put the info label fieled with value "The application down at the moment please save the form and access it later." as hidden on each page. When error occurs on the page or at the end of the form that will be picked up once again by on error event and in the script i will check the form where the message is coming up if it is not from the form start event then show the info field.

Also I can save the XML when user submit the form on ebase server and in another form i can read the XML and insert data in database through schedular. (However i havent completed this one it only my view).

Many thanks for your reply once again.
0 x


Who is online

Users browsing this forum: No registered users and 122 guests