[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] Fail Safe for Applets - How?
I spent alot of time thinking about this fail safe stuff. I'm not an experienced java programmer
by any means so how would I go about writing a wrapper class that will do the reconnect? I mean,
what are the steps involved in doing this?
What I was trying to do previously is when the exception is thrown (because the connection went
down), I called a method which would go and try to do a connect. Then I would check isConnected to
see if true and if not wait a while and try again.
Am I on the right track here?
--- Marcel Ruff <mr at marcelruff.info> wrote:
> chris lau wrote:
> >I used the code from the applet examples as a reference to adding code in my applet to connect
> >xmlblaster. However, there was a case where the blaster server went down (I closed it
> >accidentally) and the applet threw an exception. When I started up the server again and
> >a message (PtP), the applet didn't get any notifications. The only way I got it to receive
> >messages again was to refresh the webpage which reloaded the applet - which logged in again. In
> >real life situation, the user wouldn't even know that the connection went down and would be
> >wondering why there are no notifications coming in.
> >I looked at some of the fail safe examples in the site and I noticed that none of the classes
> >needed are in the xmlBlasterAppletLib.jar. Does this mean I can't use them?
> >If not, is there a way to get some sort of simple fail safe mechanism working?
> The primitive applet code has no fail safe features.
> You could wrap a class around it which does reconnect for you.
> This would be a nice feature to add to our distribution ...
> >Do You Yahoo!?
> >Tired of spam? Yahoo! Mail has the best spam protection around
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around