chris lau wrote:
Hi Marcel,
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.
Yes, this could be the way in the wrapper.
regards, Marcel
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 connectto
xmlblaster. However, there was a case where the blaster server went down (I closed itpublished
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 receivea
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 ...
regards, Marcel
Thanks.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com