New Posts New Posts RSS Feed: Check connection
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Check connection

 Post Reply Post Reply
Author
CaptainOrgange View Drop Down
Newbie
Newbie


Joined: 05-Oct-2011
Posts: 4
Post Options Post Options   Quote CaptainOrgange Quote  Post ReplyReply Direct Link To This Post Topic: Check connection
    Posted: 11-Oct-2011 at 4:03am
Hi
Is there a way to check if the connection to the BOS Service is lost before doing a save or before getting data from the BOS Service. I currently have a timer that runs every 10 seconds and then use the IdeaBlade.Core.HttpFns.PingServer() method and then stop processing on the client side if the connection is lost. This works great.
 
But I want to know is there a central place I can check for this, because sometimes the users will click on save and the connection is lost then I get the exception stating there is not endpoint.
 
Please if you can point me into a direction it would be most helpfull.
 
kind regards

Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 12-Oct-2011 at 2:47pm
Hi CaptainOrgange;

We usually recommend users to listen to EntityManager.EntityServerError event to handle any EntityServer related exception. http://drc.ideablade.com/xwiki/bin/view/Documentation/understand-entityserverexception

In addition, in case you're interested, we also have a list of troubleshooting method to analyze common EntityServer errors. http://drc.ideablade.com/xwiki/bin/view/Documentation/deploy-troubleshooting-ntier

Hope this helps.

Back to Top
CaptainOrgange View Drop Down
Newbie
Newbie


Joined: 05-Oct-2011
Posts: 4
Post Options Post Options   Quote CaptainOrgange Quote  Post ReplyReply Direct Link To This Post Posted: 13-Oct-2011 at 9:46pm
Hi.
I got this working by checking the saving and fetching events. So there I am able to stop all processing until I am able to ping the BOS Service using the IdeaBlade.Core.HttpFns.PingServer() method.
 
By getting this to work I came across the next problem and I would like to know if there is a work around for this problem.
 
Lets say I have a person entity, and before I save, I disable my Network Adapter, so on the Saving event I am not able to ping the server, which is the expected behaviour, and I give notification to the user, I then enable the network adapter again, then the ping goes through and the person entity is persisted correctly.
 
But taking the same scenario, Before I save the person entity, I kill the ServerConsole application, so now on the saving event, I am also not able to ping the BOS Server. I then start the ServerConsole again, and then I am able to ping the Server again, but this time the person entity is not saved. I get a "there is not endpoint listening error".
 
Here is the questions then.
1. What should I do on the client side when the ServerConsole crashes while the users are logged in. Because restarting the BOS ServerConsole application alone does not work.
2. Do you keep a reference to the current working ServerConsole, that is unique for the ServerConsole ? Otherwise how come it works when the network adapter is disabled and enabled again, but not when restarting the BOS Service ?
3. Is there anyway to notify the front end when the BOS Service crashes ?
 
I know I can catch the exceptions, but would like to do something before the exceptions occur.
 
Kind regards
 


Edited by CaptainOrgange - 13-Oct-2011 at 9:51pm
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 14-Oct-2011 at 6:47pm
Hi CaptainOrgange;

I was able to repro what you're seeing with the ServerConsole. But before I investigate this further, I just want to make sure that you're not planning to use the ServerConsole for your real production deployments. The ServerConsole is intended to be used for development and testing only.

We usually recommend that you work with an offline EntityManager and its cache when anticipating connection problems. Please see the following write up for more details.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down