Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Event Streams in Action this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

SocketException Using Pooled Sockets

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,
I am working on a java application (JDK 1.3.1 running on Windows NT) that does a TCP/IP connection to a backend legacy system running on UNIX. This java application has been running successfully for over a year, using Sockets to send data to and receive data from the backend legacy system. A new Socket was instantiated for each transmission of data.
We are now trying to pool our sockets in order to improve efficiency. Each time the java application re-uses a Socket from the pool to communicate with the backend legacy system, a SocketException is thrown. We are able to send data from the java application to the legacy system. But when we try to receive data by invoking the 'read' method of the Socket's InputStream, we get a SocketException with the message "Connection shutdown: JVM_recv in socket input stream read." I have verified that the Socket's 'close' method is not being called.
Does anyone have any ideas about what may be causing this exception or how I can resolve it? Thanks very much for your help.
Dom
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Neither the socket InputStream, nor the socket at the other end is being closed?
- Peter
 
Dom Incollingo
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing is being closed on the client side (the java application). Someone I work with suggested that we may be having a problem on the server side(UNIX legacy system) - that perhaps UNIKIX is locking the socket.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!