Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java tcp connection is still open after destroying applet.

Status
Not open for further replies.

peteru

Technical User
Oct 26, 2001
27
0
0
DE
Hi,

I have a java applet in a IE Browser that communicates with a 3rd machine (not the web server) using tcp/ip.
When I start the applet everthing is initialized and working well.
When I destroy the applet (e.g go to a new websites) and start it again (e.g. go back to the old website) it seems that the IP connection is still open. The only way to close this communication is to close the whole IE (and therefore the java console).

Is there any way to avoid this ?
My problem is that the 3rd machine is really confused if there is a "old" connection and a "new" one.

Thanks in advanced,
Peter
 
I take it you are working with a java.net.Socket object - just make sure that you call the Socket.close() method, and any IO streams associated with it.

--------------------------------------------------
Free Database Connection Pooling Software
 
That is my problem. I'm using a javabean jar that I cannot control. Is there a way to close and restart the java vm to make sure that everythink is clean?
 
ASFAIK only by closing the browser.
If your "javabean jar" is not working correctly (ie not cleaning up properly and disconnecting the connection), then I would not use it !

--------------------------------------------------
Free Database Connection Pooling Software
 
That is what I would like to do , but in reality cannot do. :)
 
Then in reality, you will have to live with closing the browser.

Where did you get this jar from ? Is it open source ? Can you leagally decompile and fix it ?

--------------------------------------------------
Free Database Connection Pooling Software
 
Does it do a complex job? Could you write your own?

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
Thanks sedj and tim,
i raised a problem ticket to solve this. Rewriting it to complex it is a app that is communicating with an CTI Server for Outbound,

regards,
Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top