File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Re-Connect feature on client side.

 
Abhinav Anand
Ranch Hand
Posts: 113
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
In my client implementation, the user starts the client by typing out the host name and port number in the command line arguments. Now suppose after connecting with the server, there was a connection failure. So the reference to remote object now is invalid and cannot be used to interogate the database on server.
So should i provide an option in my client's menu system to reconnect with the server?
In my present implementation the user has to restart the client to reconnect with the server.
Any suggetions...
 
Michael Morris
Ranch Hand
Posts: 3451
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vishal,

So should i provide an option in my client's menu system to reconnect with the server?
In my present implementation the user has to restart the client to reconnect with the server.

I did exactly the same as you. If there were a failure after client initialization, then a restart was necessary. It would be a nice feature to be able to restart the client, but I don't think it is a necessity.
Hope this helps,
Michael Morris
 
Tybon Wu
Ranch Hand
Posts: 84
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the beta it says your programs must not require use of command line arguments other than the single mode flag... So obviously in networked mode, my client has a connect and disconnect menu items.
 
Pete Lyons
Ranch Hand
Posts: 109
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Michael that a restart is probably just fine with the assessors. However, since my code was already encapsulated into an object that could take a String (hostname) or a File, and create the necessary connections, adding menu items to open a local file or connect (or re-connect) to a server was trivial, so I did it. I would say as long as you don't have duplicated code, you should be OK.
 
Abhinav Anand
Ranch Hand
Posts: 113
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I have not provided the reconnect feature on the client. Although i can easily reconnect by passing string parameters to the ConnectionFactory but i feel that this part is unnecessary.
Any suggetions...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic