From: Dave B. <bla...@us...> - 2013-07-25 10:17:20
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6451/src/org/sblim/cimclient/internal/wbem Modified Files: Tag: Experimental WBEMClientCIMXML.java Log Message: 2651 [UNDO] IOException when tracing the cimxml Index: WBEMClientCIMXML.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/WBEMClientCIMXML.java,v retrieving revision 1.21.2.73 retrieving revision 1.21.2.74 diff -u -d -r1.21.2.73 -r1.21.2.74 --- WBEMClientCIMXML.java 24 Jul 2013 14:38:56 -0000 1.21.2.73 +++ WBEMClientCIMXML.java 25 Jul 2013 10:17:18 -0000 1.21.2.74 @@ -72,7 +72,6 @@ * 3601894 2013-01-23 blaschke-oss Enhance HTTP and CIM-XML tracing * 2614 2013-02-21 blaschke-oss Remove redundant code in transmitRequest * 2616 2013-02-23 blaschke-oss Add new API WBEMClientSBLIM.sendIndication() - * 2651 2013-07-23 blaschke-oss IOException when tracing the cimxml */ package org.sblim.cimclient.internal.wbem; @@ -164,9 +163,7 @@ private final WBEMConfiguration iConfiguration = new WBEMConfiguration(new Properties()); - private static FileOutputStream iCimXmlTraceFile = null; - - private static int iActiveInstances = 0; + private FileOutputStream iCimXmlTraceFile = null; private Locale[] iLocales; // final @@ -261,17 +258,15 @@ if (this.iConfiguration.isCimXmlTracingEnabled() && LogAndTraceBroker.getBroker().getXmlTraceStream() == null) { String filename = this.iConfiguration.getCimXmlTraceStream(); - if (filename != null && filename.length() > 0 - && WBEMClientCIMXML.iCimXmlTraceFile == null) { + if (filename != null && filename.length() > 0) { if (filename.equalsIgnoreCase("System.out")) { LogAndTraceBroker.getBroker().setXmlTraceStream(System.out); } else if (filename.equalsIgnoreCase("System.err")) { LogAndTraceBroker.getBroker().setXmlTraceStream(System.err); } else { try { - WBEMClientCIMXML.iCimXmlTraceFile = new FileOutputStream(filename); - LogAndTraceBroker.getBroker().setXmlTraceStream( - WBEMClientCIMXML.iCimXmlTraceFile); + this.iCimXmlTraceFile = new FileOutputStream(filename); + LogAndTraceBroker.getBroker().setXmlTraceStream(this.iCimXmlTraceFile); } catch (IOException e) { logger.trace(Level.FINE, "Unable to open " + WBEMConfigurationProperties.CIMXML_TRACE_STREAM + "=" @@ -282,7 +277,6 @@ } this.iInitialized = true; - ++WBEMClientCIMXML.iActiveInstances; } finally { logger.exit(); @@ -635,16 +629,12 @@ if (this.iHttpClientPool != null) { this.iHttpClientPool.closePool(); } - } finally { - if (--WBEMClientCIMXML.iActiveInstances <= 0 - && WBEMClientCIMXML.iCimXmlTraceFile != null) { - try { - WBEMClientCIMXML.iCimXmlTraceFile.close(); - } catch (IOException e) { - // Ignore CIM-XML trace file exception - } - WBEMClientCIMXML.iCimXmlTraceFile = null; + if (this.iCimXmlTraceFile != null) { + this.iCimXmlTraceFile.close(); } + } catch (IOException e) { + // Ignore CIM-XML trace file exception + } finally { this.iClosed = true; logger.exit(); } |