From: Dave B. <bla...@us...> - 2012-05-08 17:22:11
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient In directory vz-cvs-3.sog:/tmp/cvs-serv24222/src/org/sblim/cimclient Modified Files: WBEMListenerSBLIM.java Log Message: 3513228 - Reliable Indications support can create lots of threads Index: WBEMListenerSBLIM.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/WBEMListenerSBLIM.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- WBEMListenerSBLIM.java 14 Mar 2012 11:21:36 -0000 1.17 +++ WBEMListenerSBLIM.java 8 May 2012 17:22:08 -0000 1.18 @@ -24,6 +24,7 @@ * 3469018 2012-01-03 blaschke-oss Properties not passed to CIMIndicationHandler * 3477087 2012-01-23 blaschke-oss Need Access to an Indication Sender's IP Address * 3496385 2012-03-02 blaschke-oss JSR48 1.0.0: add WBEMListener get/setProperty + * 3513228 2012-04-23 blaschke-oss Reliable Indications support can create lots of threads */ package org.sblim.cimclient; @@ -63,6 +64,8 @@ private HttpServerConnection iConnection; + private CIMIndicationHandler iIndicationHandler; + /** * Ctor. * @@ -92,17 +95,18 @@ "Listener must be instance of IndicationListener or IndicationListenerSBLIM"); this.iIndicationListener = pIndicationListener; CIMEventDispatcher eventDispatcher = new CIMEventDispatcher(this.iIndicationListener); - CIMIndicationHandler indicationHandler = new CIMIndicationHandler(eventDispatcher, - config); - this.iConnection = new HttpServerConnection( - new HttpConnectionHandler(indicationHandler), pLocalAddress, pPort, pSSL, - config); + this.iIndicationHandler = new CIMIndicationHandler(eventDispatcher, config); + this.iConnection = new HttpServerConnection(new HttpConnectionHandler( + this.iIndicationHandler), pLocalAddress, pPort, pSSL, config); } @Override protected void finalize() throws Throwable { - stop(); - super.finalize(); + try { + stop(); + } finally { + super.finalize(); + } } /** @@ -113,10 +117,12 @@ } /** - * Stops the HTTP server connection receiving the indications. + * Stops the HTTP server connection receiving the indications and the + * indication handler. */ public void stop() { this.iConnection.close(); + this.iIndicationHandler.close(); } /** |