Solved

HSM connection

Posted on 2002-05-07
3
787 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unable to start eclipse ? 17 129
Groovy:unable to resolve class error 2 68
Need to track down Infection in a Server 2008 domain user profile 7 48
java stored proc example 9 21
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This video teaches viewers about errors in exception handling.

911 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

23 Experts available now in Live!

Get 1:1 Help Now