From: Dave B. <bla...@us...> - 2012-04-23 10:08:19
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient In directory vz-cvs-3.sog:/tmp/cvs-serv21866/src/org/sblim/cimclient Modified Files: Tag: Experimental 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.5.2.11 retrieving revision 1.5.2.12 diff -u -d -r1.5.2.11 -r1.5.2.12 --- WBEMListenerSBLIM.java 2 Mar 2012 21:18:22 -0000 1.5.2.11 +++ WBEMListenerSBLIM.java 23 Apr 2012 10:08:17 -0000 1.5.2.12 @@ -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(); } /** |