• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reconnect to server

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi team
Did anybody has provided reconnect option to the client GUI, in case server goes down while client is operating. How this can be done ??
What particular needs to be catch to detect the server has gone down???
Is it required ???

Amit
 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't provide a reconnect option. The client would get a RemoteException if the server went down, but the client would also get a RemoteException if there were network problems,...etc.
In my application the client would receive a "Server is unavailable" popup error for any RemoteException. Then both the client and server would need to be restarted.
 
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did the exact same thing as Robin.
I hate saying this too much because it sounds like an excuse to not do more work, but reconnecting on remote failure is outside the scope of this assignment. Your adding more unnecessary complexity to your solution which opens you up to more potential mistakes.
[ August 01, 2002: Message edited by: BJ Grau ]
 
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I hate saying this too much because it sounds like an excuse to not do more work, but reconnecting on remote failure is outside the scope of this assignment. Your adding more unnecessary complexity to your solution which opens you up to more potential mistakes.


I completely agree. If you satisfy all the requirements (which do not ask for reconnects), you will get 155/155, and if you attempt to add some extra features, you might get penalised for it.
Eugene.
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't allow reconnect either although I could have done it easily since I had a ServerEventService (which was also bound in the RMI registry) that ran in a background thread. There were four types of ServerEvents: startup, delayedShutdown, shutdown and heartbeat. A heartbeat was sent every 60 seconds for client confidence that the server was alive. If five heartbeats were missed, then the client assumed the server was dead. The problem with a true network failure is that in order to reconnect, you would have to "poll" the service periodically ignoring RemoteExceptions until the service came on line again. I just felt like it was better to inform the user of the stale connection and suggest that they try connecting later.
Hope this helps,
Michael Morris
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sun might penalize you for "scope creep". Save yourself from the risk of the added feature, but make a mental note of it so you can cite it when later asked how the system could be (hypothetically) improved.
Disclaimer: I haven't taken the exam yet, so this is just conjecture based on other Ranch posts.
e
[ August 02, 2002: Message edited by: Erick Reid ]
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Eric,
Take it from me, if your design works and you can justify it, complexity is not an issue. My implementation was well beyond the scope of the assignment and I scored 154 (losing a point only on documentation). I don't suggest that anyone go to as much trouble as I did (ask my wife I was a nervous wreck the last few weeks on the assignment) but I do believe that going the extra mile will get you a higher score.
Michael Morris
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic