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.
Checking the database availibilty before starting the form
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 11
- Joined: Thu Oct 16, 2008 11:33 am
- Location: Mumbai, Currently in Croydon
-
- Ebase User
- Posts: 94
- Joined: Fri Sep 14, 2007 12:18 pm
- Location: The Netherlands
- Contact:
Checking the database availibilty before starting the form
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
Regards,
Antony
0 x
-
- 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
Hi Antony, thanks for your reply.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
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
- 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
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.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.
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.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.
0 x
-
- Ebase User
- Posts: 11
- Joined: Thu Oct 16, 2008 11:33 am
- Location: Mumbai, Currently in Croydon
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.
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 110 guests