private WsResource createJmxAddressResource(WsResource resource) {
        final String connectorAddress = LocalConnectorHelper.getConnectorAddress();
        if (connectorAddress != null) {
            try {
                if (!resource.exists()) {
                    resource.create();
                }
                OutputStream os = resource.putStream();
                os.write(connectorAddress.getBytes("UTF-8"));
                os.flush();
                os.close();

                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                    Tr.event(tc, "Successfully printed the JMX local connector address.");
                }

                return resource;
            } catch (IOException ioe) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Received IOException while writting address to file: ", ioe);
                }
                FFDCFilter.processException(ioe, getClass().getName(), "createJMXWorkAreaResourceIO");

            } catch (SecurityException se) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Received SecurityException while writting address to file: ", se);
                }
                FFDCFilter.processException(se, getClass().getName(), "createJMXWorkAreaResourceSec");
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Connector address was null, so we can't write the address to a file.");
        }
        return null;
    }
private WsResource createJmxAddressResource ( WsResource resource ) { final String connectorAddress = LocalConnectorHelper . getConnectorAddress ( ) ; if ( connectorAddress != null ) { try { if ( ! resource . exists ( ) ) { resource . create ( ) ; } OutputStream os = resource . putStream ( ) ; os . write ( connectorAddress . getBytes ( "UTF-8" ) ) ; os . flush ( ) ; os . close ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Successfully printed the JMX local connector address." ) ; } return resource ; } catch ( IOException ioe ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Received IOException while writting address to file: " , ioe ) ; } FFDCFilter . processException ( ioe , getClass ( ) . getName ( ) , "createJMXWorkAreaResourceIO" ) ; } catch ( SecurityException se ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Received SecurityException while writting address to file: " , se ) ; } FFDCFilter . processException ( se , getClass ( ) . getName ( ) , "createJMXWorkAreaResourceSec" ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Connector address was null, so we can't write the address to a file." ) ; } return null ; }
@param resource
@return