Results 1 to 2 of 2
- 08-09-2007, 03:02 PM #1
Member
- Join Date
- Aug 2007
- Posts
- 26
- Rep Power
- 0
client-server communication problem
Hello,
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??
Thanks,
- 08-09-2007, 03:21 PM #2
Member
- Join Date
- Aug 2007
- Posts
- 9
- Rep Power
- 0
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:Runtime.exec(String)
Java Code:Process.waitFor()
Good luck.
Similar Threads
-
how client know what kind of server
By lemur in forum NetworkingReplies: 3Last Post: 05-31-2008, 08:11 AM -
client/server messages exchange after 5 min
By dim_ath in forum Advanced JavaReplies: 2Last Post: 01-22-2008, 09:46 AM -
how to send .jar files client to server
By gobinathm in forum NetworkingReplies: 1Last Post: 12-25-2007, 05:05 AM -
Identify Client in Socket Client Server Application
By masadjie in forum NetworkingReplies: 1Last Post: 12-20-2007, 10:18 AM -
Problems with client and server
By Albert in forum Advanced JavaReplies: 2Last Post: 07-02-2007, 07:07 AM
Bookmarks