Results 1 to 2 of 2
  1. #1
    revathi17 is offline Member
    Join Date
    Aug 2007
    Rep Power

    Default client-server communication problem


    I have the following problem in the client-server communication in one of the applications. I have a startup process which communicates with a init server(init server is dedicated to assign port numbers to various servers randomly or based on username) to get the port number to actually start server1. The problem is if no init server or a server1 is already running,they are started in the same process as the startup process. So if the startup process dies,the init and server1 dies with it which is not I want.
    What is the solution for this? how can I make the startup process to run in a separate process independent of other servers??


  2. #2
    rhobincu is offline Member
    Join Date
    Aug 2007
    Rep Power


    Usually when developing a server, you create all the server peers as separate Threads. Try making your servers implement Runnable or extending Thread and running them as separate processes.

    If your servers are not java classes (let's say some external applications) you can make use

    Java Code:
    and then

    Java Code:
    in order to keep your init process alive.

    Good luck.

Similar Threads

  1. how client know what kind of server
    By lemur in forum Networking
    Replies: 3
    Last Post: 05-31-2008, 08:11 AM
  2. client/server messages exchange after 5 min
    By dim_ath in forum Advanced Java
    Replies: 2
    Last Post: 01-22-2008, 09:46 AM
  3. how to send .jar files client to server
    By gobinathm in forum Networking
    Replies: 1
    Last Post: 12-25-2007, 05:05 AM
  4. Identify Client in Socket Client Server Application
    By masadjie in forum Networking
    Replies: 1
    Last Post: 12-20-2007, 10:18 AM
  5. Problems with client and server
    By Albert in forum Advanced Java
    Replies: 2
    Last Post: 07-02-2007, 07:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts