This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes Why this application hangs up? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Why this application hangs up?" Watch "Why this application hangs up?" New topic
Author

Why this application hangs up?

arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
Hello Everybody,
I have made following four files for my application..this application is suppose to do following:-
1. This will run on my local Network.
2. It will behave as server and will accepts request from different clients.
3. After receving a request it will process the same and will send to another machine on same network.
4. This "another machine" after receving will send back a response.
5. My application will output as per its response.
I have made following four files:
1. MultiServer : This will listens all request
2. MultiServerThread: this will process the request.
3. MultiProtocol: It declares every commonly used variables.
4. Mc: This will interects with my "another machine".
My problem with this application is that:-
1. It sometimes hangs and will start if I press "Ctrl+C" instead of terminating it.
2. Sometime it never provide a response back from the read method of Mc file.

I am in a fix & don't know a reason for it .. could you please help me?
P.S.: I apologise for such a long Thread..but i don't know how else can I put my code here
regards,
Arun



Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

Could you show your test procedure?
Which computers start what processes, and in what order?
Thanks.
arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
The objective here is to listenes from any computer from the same network at a computer which will run this MultiServer application..This after recieving a call will process this call and will send it to "another machine"..which in trun sending a response back at the time of accepting any request..
So that means this computer which is running MultiServer aplication will keep on listening the request from various computer..

So I am trying to send too many request at same time from various computer at this MultiServer computer and accepting it to respond me back..
Can you find a reason?
regards,
Arun
Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

What I want you to say is
First I start the server on Computer A
second I start a client on Computer B
third I start so and so on Computer C
I know your objective I think, but what I want is your testing procedure. I personally made a MessagePassingInterface type of program in RMI so I am familiar with some of these issues. But without knowing how you are testing its hard to know wher to look for the problem.
arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
I apologise if following answer could not explain what you're looking for. I would like to request you to find some more time and explain me your needs in more details in that case.
Procedure is as folows:
1. First I run a program from Third Party vendor which is running on my server. Say Machine A
2. Than i run my MultiServer program runs on another machine say machine B
3. After running these two programs now i try to sends requests from various client machine to machine B and trying to observe the result back on Client.
4. there are about 35 computers on this network and they can sends there request to machine B.
5. That means all above 4 programs are running on machine.
Need is:
Client should send a request which will land on machine B this will in turn sends request to machine A. Machine A will send back a response to machine B and machine B will than sends a response based on this to client back

Hope this will explain the procedure of my testing
procedure.
Pl let me know your comments.
regards,
Arun
arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
Do I need to provide some more information for same...
Can you help me debug it ?
regards,
Arun
arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
Oops...perhaps I am giving less information to attract JGurus to answer for this posting...or perhaps this is something stupid to ask for..
Could you please let me know your comments?
PLEASE HELP ME TO SORT THIS ISSUE.
regards,
arun
arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
OOps..still this thread is being unanswered..can it attracts somebody's eye..let me know if any additional info reqd to solve this issue..
Any help me be highly appreciated..
regards,
Arun
Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

I understand your processs now.
Since you are starting a couple of different JVMs here, exactly which one is locking up and forcing you to press ctrl-C in order to continue? And where in the process does it lock up?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Why this application hangs up?