Solved

HSM connection

Posted on 2002-05-07
3
773 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
3 Comments
 
LVL 3

Expert Comment

by:rjackman
Comment Utility
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
Comment Utility
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
Comment Utility
Per Recommendation,

PashaMod
Community Support Moderator @Experts Exchange
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now