• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Socket Issue

 
author
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am implementing UrlyBird 1.2.2 using sockets. From time to time when I create a connection to my server the call
gets lock and the appliction is stuck at that point. I create a new Socket for each connection and close both output and input streams then close the socket after I am done. I also create the ObjectOutputStream before I create the input stream.

I am using Java 6 and I ran jconsole and there were no deadlocks, just the input stream is locked. I did googled it and found it to be not uncommon, but no real reason why or how to prevent it.

I have placed a
call at the bottom of the loop my server is running and this seems to help, but I would like to know what causes this and how to prevent this. Any suggestions?

Thanks
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does this describe your problem?
 
Bill Bejeck
author
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes it does. I actully read this doing my research of the problem. I follow the procedures outlined, but I still get the problem. Should I just reference this issue in my documentation and move on? I would like to try and overcome this situation
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic