Win a copy of 97 Things Every Java Programmer Should Know 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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.
 
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic