Solved

HSM connection

Posted on 2002-05-07
3
826 Views
Last Modified: 2012-06-27
Hi,

I am writing a program to send commands to a HSM. This is done using sockets. I have a problem that the socket does not seem to disconnect imediately after calling the close method on the socket. It seems to wait for a timeout before disconnecting, is there anyway that I can force the connection to be dropped straight away as we only have a limited number of HSM connections.

Thanks,

Darren.
0
Comment
Question by:isond
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Expert Comment

by:rjackman
ID: 6995613
hi
try assigning null to ref after calling close
also close all the streams opened by that socket befor closing it
try
{
  //close input& output stream opened by this socket
  instream.close();
  instream=null;
  outstream.close();
  outstream = null;
  socket.close();
  socket=null;
}
catch(IOException ioe)
{
  ioe.printStackTrace();
}
0
 
LVL 35

Expert Comment

by:girionis
ID: 8709860
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:

- To be PAQ'ed and points NOT refunded

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 8774362
Per Recommendation,

PashaMod
Community Support Moderator @Experts Exchange
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sql import cannot be resolved jsp 3 113
Is there a simpler dropbox system? 10 52
Crystal Reports Licensing Questions 4 83
batch vs regular insert in spring DAO 2 50
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question