FileDocCategorySizeDatePackage
InitConfTransfer.javaAPI DocGlassfish v2 API41962Fri May 04 22:35:08 BST 2007com.sun.enterprise.tools.upgrade.miscconfig

InitConfTransfer

public class InitConfTransfer extends Object
author
hans

Fields Summary
private CommonInfoModel
commonInfo
private com.sun.enterprise.util.i18n.StringManager
stringManager
private Logger
logger
Constructors Summary
public InitConfTransfer(CommonInfoModel cim)
Creates a new instance of InitConfTransfer

    
           
       
        commonInfo = cim;
    
Methods Summary
public voidtransform()

        logger.log(Level.INFO, stringManager.getString("upgrade.configTransfers.initconf.startMessage"));
        
        String fileName = commonInfo.getSourceInitConfFileName();
        BufferedReader reader = null;
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        //factory.setValidating(true);
        factory.setNamespaceAware(true);
        try {
            DocumentBuilder builderDomainXml = factory.newDocumentBuilder();
            builderDomainXml.setEntityResolver((org.xml.sax.helpers.DefaultHandler)Class.forName
            ("com.sun.enterprise.config.serverbeans.ServerValidationHandler").newInstance());
            Document resultDoc = builderDomainXml.parse( new File(commonInfo.getTargetConfigXMLFile()) );
            reader = new BufferedReader(new FileReader(fileName));
            while (reader.ready()) {
                String line = reader.readLine();
                String key = null;
                String value = null;
                StringTokenizer st = new StringTokenizer(line, " ", false);
                if ( st.hasMoreTokens() ) {
                    key = st.nextToken();
                } else {
                    continue;
                }
                if ( st.hasMoreTokens() ) {
                    value = st.nextToken();
                } else {
                    continue;
                }
                try {
                    Method m = getClass().getMethod("transform" + key, new Class [] { Document.class, String.class });
                    m.invoke(this, new Object [] { resultDoc, value } );
                } catch (NoSuchMethodException nsm) {
                    logger.log(Level.WARNING, stringManager.getString("upgrade.configTransfers.initconf.unsupportedElement") + key);
                } catch (Exception e) {
                    logger.log(Level.WARNING, stringManager.getString("upgrade.configTransfers.initconf.exception") + e.getLocalizedMessage());
                }
            }
            // write out the resultDoc to destination file.
            // Use a Transformer for output
            TransformerFactory tFactory = TransformerFactory.newInstance();
            Transformer transformer = tFactory.newTransformer();
            if (resultDoc.getDoctype() != null){
                String systemValue = resultDoc.getDoctype().getSystemId();
                transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, systemValue);
                String pubValue = resultDoc.getDoctype().getPublicId();
                transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, pubValue);
            }
            DOMSource source = new DOMSource(resultDoc);
            StreamResult result = new StreamResult(new FileOutputStream(commonInfo.getTargetConfigXMLFile()));
            transformer.transform(source, result);
        } catch (IOException ioe) {
            logger.log(Level.WARNING, stringManager.getString("upgrade.configTransfers.initconf.iofailure") + ioe.getLocalizedMessage());
        } catch (Exception e) {
            logger.log(Level.WARNING, stringManager.getString("upgrade.configTransfers.initconf.exception") + e.getLocalizedMessage());
        }
        if (reader != null) {
            try {
                reader.close();
            } catch (Exception e) {
                logger.log(Level.WARNING, stringManager.getString("upgrade.configTransfers.initconf.iofailure") + e.getLocalizedMessage());
            }
        }
    
public voidtransformAsyncDNS(org.w3c.dom.Document domainXML, java.lang.String value)

        //TO DO - don't know what this translates to?
    
public voidtransformConnQueueSize(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service/connection-pool:queue-size-bytes
        logger.finest("ConnQueueSize = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList subList = httpServiceElement.getElementsByTagName("connection-pool");
                // There can be only one connection-pool element.
                Element element = (Element)subList.item(0);
                //If the element exists in the target, do the transformation
                if (element != null) {
                    //Fix for CR 6461070
                    element.setAttribute("queue-size-in-bytes", value);
                    //element.setAttribute("queue-size-bytes", value);
                    //End - 6461070
                }
            }
        }
    
public voidtransformDNS(org.w3c.dom.Document domainXML, java.lang.String value)

        logger.finest("DNS = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList httpList = httpServiceElement.getElementsByTagName("http-protocol");
                // There should be only one http-protocol element.
                Element element = (Element)httpList.item(0);
                //If the element exists in the target, do the transformation
                if (element != null) {
                    if (value.equalsIgnoreCase("off")) {
                        element.setAttribute("dns-lookup-enabled", "false");
                    } else {
                        element.setAttribute("dns-lookup-enabled", "true");
                    }
                }
            }
        }
    
public voidtransformErrorLogDateFormat(org.w3c.dom.Document domainXML, java.lang.String value)

    
public voidtransformExtraPath(org.w3c.dom.Document domainXML, java.lang.String value)

        
    
public voidtransformHTTPVersion(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service/http-protocol:http-version
        logger.finest("HTTPVersion = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList httpList = httpServiceElement.getElementsByTagName("http-protocol");
                // There should be only one http-protocol element.
                Element element = (Element)httpList.item(0);
                //If the element exists in the target, do the transformation
                if (element != null) {
                    element.setAttribute("http-version", value);
                }
            }
        }
    
public voidtransformHeaderBufferSize(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service/request-processing:header-buffer-size-bytes
        logger.finest("HeaderBufferSize = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList subList = httpServiceElement.getElementsByTagName("request-processing");
                // There can be only one request-processing element.
                Element element = (Element)subList.item(0);
                //If the element exists in the target, do the transformation
                if (element != null) {
                    element.setAttribute("header-buffer-size-bytes", value);
                }
            }
        }
    
public voidtransformIOTimeout(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service/request-processing:request-timeout-in-seconds
        logger.finest("IOTimeout = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element.
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList subList = httpServiceElement.getElementsByTagName("request-processing");
                // There can be only one request-processing element.
                Element element = (Element)subList.item(0);
                //If the element exists in the target, do the transformation
                if (element != null) {
                    element.setAttribute("request-timeout-in-seconds", value);
                }
            }
        }
    
public voidtransformInit(org.w3c.dom.Document domainXML, java.lang.String value)

        //NSAPI no longer supported
    
public voidtransformKeepAliveThreads(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service/keep-alive:keep-alive-thread-count
        logger.finest("KeepAliveThreads = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList subList = httpServiceElement.getElementsByTagName("keep-alive");
                // There can be only one request-processing element.
                Element element = (Element)subList.item(0);
                //If the element exists in the target, do the transformation
                if (element != null) {
                    element.setAttribute("keep-alive-thread-count", value);
                }
            }
        }
    
public voidtransformKeepAliveTimeout(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service/keep-alive:timeout-in-seconds
        logger.finest("KeepAliveTimeout = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList subList = httpServiceElement.getElementsByTagName("keep-alive");
                // There can be only one request-processing element.
                Element element = (Element)subList.item(0);
                //If the element exists in the target, do the transformation
                if (element != null) {
                    element.setAttribute("timeout-in-seconds", value);
                }
            }
        }
    
public voidtransformKernelThreads(org.w3c.dom.Document domainXML, java.lang.String value)

        //unsupported
    
public voidtransformListenQ(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service/connection-pool:max-pending-count
        logger.finest("ListenQ = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList subList = httpServiceElement.getElementsByTagName("connection-pool");
                // There can be only one connection-pool element.
                Element element = (Element)subList.item(0);
                //If the element exists in the target, do the transformation
                if (element != null) {
                    element.setAttribute("max-pending-count", value);
                }
            }
        }
    
public voidtransformLogFlushInterval(org.w3c.dom.Document domainXML, java.lang.String value)

    
public voidtransformMaxKeepAliveConnections(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service/keep-alive:timeout-in-seconds
        logger.finest("MaxKeepAliveConnections = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList subList = httpServiceElement.getElementsByTagName("keep-alive");
                // There can be only one request-processing element.
                Element element = (Element)subList.item(0);
                //If the element exists in the target, do the transformation
                if (element != null) {
                    element.setAttribute("max-keep-alive-connections", value);
                }
            }
        }
    
public voidtransformNativePoolMaxThreads(org.w3c.dom.Document domainXML, java.lang.String value)

    
public voidtransformNativePoolMinThreads(org.w3c.dom.Document domainXML, java.lang.String value)

    
public voidtransformNativePoolQueueSize(org.w3c.dom.Document domainXML, java.lang.String value)

    
public voidtransformNativePoolStackSize(org.w3c.dom.Document domainXML, java.lang.String value)

    
public voidtransformNetsiteRoot(org.w3c.dom.Document domainXML, java.lang.String value)

        
    
public voidtransformPidLog(org.w3c.dom.Document domainXML, java.lang.String value)

    
public voidtransformRcvBufSize(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service/connection-pool:receive-buffer-size-bytes
        logger.finest("RcvBufSize = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList subList = httpServiceElement.getElementsByTagName("connection-pool");
                // There can be only one connection-pool element.
                Element element = (Element)subList.item(0);
                //If the element exists in the target, do the transformation
                if (element != null) {
                    element.setAttribute("receive-buffer-size-bytes", value);
                }
            }
        }
    
public voidtransformRqThrottle(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service/request-processing:thread-count
        logger.finest("RqThrottle = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList subList = httpServiceElement.getElementsByTagName("request-processing");
                // There can be only one request-processing element.
                Element element = (Element)subList.item(0);
                //If the element exists in the target, do the transformation
                if (element != null) {
                    element.setAttribute("thread-count", value);
                }
            }
        }
    
public voidtransformRqThrottleMin(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service/request-processing:initial-thread-count
        logger.finest("RqThrottleMin = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList subList = httpServiceElement.getElementsByTagName("request-processing");
                // There can be only one request-processing element.
                Element element = (Element)subList.item(0);
                //If the element exists in the target, do the transformation
                if (element != null) {
                    element.setAttribute("initial-thread-count", value);
                }
            }
        }
    
public voidtransformSSL3SessionTimeout(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service
        //property "ssl3-session-timeout"
        //specified as a name value pair in the property element under http-service.
        String name = "ssl3-session-timeout";
        logger.finest("SSL3SessionTimeout = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList resultProperties = httpServiceElement.getElementsByTagName("property");
                Element resultProperty = null;
                if(resultProperties != null){
                    for(int index=0; index < resultProperties.getLength(); index++){
                        if(((Element)resultProperties.item(index)).getAttribute("name").equals(name)){
                            resultProperty = (Element)resultProperties.item(index);
                            resultProperty.getAttributeNode("value").setValue(value);
                            //this.handleSpecialCases(element, resultProperty, parentSource, parentResult);
                            break;
                        }
                    }
                }
                if(resultProperty == null){
                    resultProperty = httpServiceElement.getOwnerDocument().createElement("property");
                    resultProperty.setAttribute("name", name);
                    resultProperty.setAttribute("value", value);
                    httpServiceElement.appendChild(resultProperty);
                }
            }
        }
    
public voidtransformSSLCacheEntries(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service
        //property "ssl-cache-entries"
        //specified as a name value pair in the property element under http-service.
        String name = "ssl-cache-entries";
        logger.finest("SSLCacheEntries = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList resultProperties = httpServiceElement.getElementsByTagName("property");
                Element resultProperty = null;
                if(resultProperties != null){
                    for(int index=0; index < resultProperties.getLength(); index++){
                        if(((Element)resultProperties.item(index)).getAttribute("name").equals(name)){
                            resultProperty = (Element)resultProperties.item(index);
                            resultProperty.getAttributeNode("value").setValue(value);
                            //this.handleSpecialCases(element, resultProperty, parentSource, parentResult);
                            break;
                        }
                    }
                }
                if(resultProperty == null){
                    resultProperty = httpServiceElement.getOwnerDocument().createElement("property");
                    resultProperty.setAttribute("name", name);
                    resultProperty.setAttribute("value", value);
                    httpServiceElement.appendChild(resultProperty);
                }
            }
        }
    
public voidtransformSSLClientAuthDataLimit(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service
        //property "ssl-client-auth-data-limit"
        //specified as a name value pair in the property element under http-service.
        String name = "ssl-client-auth-data-limit";
        logger.finest("SSLClientAuthDataLimit = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList resultProperties = httpServiceElement.getElementsByTagName("property");
                Element resultProperty = null;
                if(resultProperties != null){
                    for(int index=0; index < resultProperties.getLength(); index++){
                        if(((Element)resultProperties.item(index)).getAttribute("name").equals(name)){
                            resultProperty = (Element)resultProperties.item(index);
                            resultProperty.getAttributeNode("value").setValue(value);
                            //this.handleSpecialCases(element, resultProperty, parentSource, parentResult);
                            break;
                        }
                    }
                }
                if(resultProperty == null){
                    resultProperty = httpServiceElement.getOwnerDocument().createElement("property");
                    resultProperty.setAttribute("name", name);
                    resultProperty.setAttribute("value", value);
                    httpServiceElement.appendChild(resultProperty);
                }
            }
        }
    
public voidtransformSSLClientAuthTimeout(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service
        //property "ssl-client-auth-timeout"
        //specified as a name value pair in the property element under http-service.
        String name = "ssl-client-auth-timeout";
        logger.finest("SSLClientAuthTimeout = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList resultProperties = httpServiceElement.getElementsByTagName("property");
                Element resultProperty = null;
                if(resultProperties != null){
                    for(int index=0; index < resultProperties.getLength(); index++){
                        if(((Element)resultProperties.item(index)).getAttribute("name").equals(name)){
                            resultProperty = (Element)resultProperties.item(index);
                            resultProperty.getAttributeNode("value").setValue(value);
                            //this.handleSpecialCases(element, resultProperty, parentSource, parentResult);
                            break;
                        }
                    }
                }
                if(resultProperty == null){
                    resultProperty = httpServiceElement.getOwnerDocument().createElement("property");
                    resultProperty.setAttribute("name", name);
                    resultProperty.setAttribute("value", value);
                    httpServiceElement.appendChild(resultProperty);
                }
            }
        }
    
public voidtransformSSLSessionTimeout(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service
        //property "ssl-session-timeout"
        //specified as a name value pair in the property element under http-service.
        String name = "ssl-session-timeout";
        logger.finest("SSLSessionTimeout = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList resultProperties = httpServiceElement.getElementsByTagName("property");
                Element resultProperty = null;
                if(resultProperties != null){
                    for(int index=0; index < resultProperties.getLength(); index++){
                        if(((Element)resultProperties.item(index)).getAttribute("name").equals(name)){
                            resultProperty = (Element)resultProperties.item(index);
                            resultProperty.getAttributeNode("value").setValue(value);
                            //this.handleSpecialCases(element, resultProperty, parentSource, parentResult);
                            break;
                        }
                    }
                }
                if(resultProperty == null){
                    resultProperty = httpServiceElement.getOwnerDocument().createElement("property");
                    resultProperty.setAttribute("name", name);
                    resultProperty.setAttribute("value", value);
                    httpServiceElement.appendChild(resultProperty);
                }
            }
        }
    
public voidtransformSecurity(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service/http-protocol:ssl-enabled
        logger.finest("Security = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList httpList = httpServiceElement.getElementsByTagName("http-protocol");
                // There should be only one http-protocol element.
                Element element = (Element)httpList.item(0);
                //If the element exists in the target, do the transformation
                if (element != null) {
                    if (value.equalsIgnoreCase("off")) {
                        element.setAttribute("ssl-enabled", "false");
                    } else {
                        element.setAttribute("ssl-enabled", "true");
                    }
                }
            }
        }
    
public voidtransformServerID(org.w3c.dom.Document domainXML, java.lang.String value)

        
    
public voidtransformServerName(org.w3c.dom.Document domainXML, java.lang.String value)

        
    
public voidtransformSndBufSize(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service/connection-pool:send-buffer-size-bytes
        logger.finest("SndBufSize = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList subList = httpServiceElement.getElementsByTagName("connection-pool");
                // There can be only one connection-pool element.
                Element element = (Element)subList.item(0);
                //If the element exists in the target, do the transformation
                if (element != null) {
                    element.setAttribute("send-buffer-size-bytes", value);
                }
            }
        }
    
public voidtransformStackSize(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service
        //property "stack-size"
        //specified as a name value pair in the property element under http-service.
        String name = "stack-size";
        logger.finest("StackSize = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList resultProperties = httpServiceElement.getElementsByTagName("property");
                Element resultProperty = null;
                if(resultProperties != null){
                    for(int index=0; index < resultProperties.getLength(); index++){
                        if(((Element)resultProperties.item(index)).getAttribute("name").equals(name)){
                            resultProperty = (Element)resultProperties.item(index);
                            resultProperty.getAttributeNode("value").setValue(value);
                            //this.handleSpecialCases(element, resultProperty, parentSource, parentResult);
                            break;
                        }
                    }
                }
                if(resultProperty == null){
                    resultProperty = httpServiceElement.getOwnerDocument().createElement("property");
                    resultProperty.setAttribute("name", name);
                    resultProperty.setAttribute("value", value);
                    httpServiceElement.appendChild(resultProperty);
                }
            }
        }
    
public voidtransformStrictHttpHeaders(org.w3c.dom.Document domainXML, java.lang.String value)

        //not exposed in domain.xml
    
public voidtransformTempDir(org.w3c.dom.Document domainXML, java.lang.String value)

        //not supported
    
public voidtransformTerminateTimeout(org.w3c.dom.Document domainXML, java.lang.String value)

        //not supported
    
public voidtransformThreadIncrement(org.w3c.dom.Document domainXML, java.lang.String value)

        //http-service/request-processing:thread-increment
        logger.finest("ThreadIncrement = " + value);
        Element docEle = domainXML.getDocumentElement();
        NodeList nodeList = docEle.getElementsByTagName("config");
        for (int i=0; i < nodeList.getLength(); i++) {
            Element configElement = (Element)nodeList.item(i);
            String attrValue = configElement.getAttribute("name");
            if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
                NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
                //there is only one http-service element
                Element httpServiceElement = (Element)httpServiceNodes.item(0);
                NodeList subList = httpServiceElement.getElementsByTagName("request-processing");
                // There can be only one request-processing element.
                Element element = (Element)subList.item(0);
                //If the element exists in the target, do the transformation
                if (element != null) {
                    element.setAttribute("thread-increment", value);
                }
            }
        }
    
public voidtransformUser(org.w3c.dom.Document domainXML, java.lang.String value)

        //not supported