Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-09-2007, 03:02 PM
Member
 
Join Date: Aug 2007
Posts: 22
revathi17 is on a distinguished road
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,
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-09-2007, 03:21 PM
Member
 
Join Date: Aug 2007
Posts: 9
rhobincu is on a distinguished road
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

Code:
Runtime.exec(String)
and then

Code:
Process.waitFor()
in order to keep your init process alive.

Good luck.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT +3. The time now is 05:53 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org