This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

sockets and browser issues.  RSS feed

Ruslan Ivanov
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using servlets in my current development.Now let's say that in one of my servlets doGet method i open a connection to a socket. Now i can keep that connection open for a long time , so to prevent my doGet from finishing i placed a syncrhonized block in there and a wait method to wait until certain task is complete my syncrhonized block is on this meaning on current servlet object. Now when the thread finishes it it notifies that its free to exit the doGet method. It works fine andn i get no problems. Problem i think is that when i try to open another Client browser and connect to my servlet i get connected but the first browser stops recieving input from the Socket. I dont see anywhere that the thread has exited it just no longer recieves the output from the Socket. What can be wrong with it ? I am testing this on one machine. Both clients on one machine and the ServerSocket again is also opened on this machine. Could it be the problem with that ? I see that the messages go to all the clients from the output in debug , but just only the last one recieves it. Thanks for your assistance.
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!