FileDocCategorySizeDatePackage
ORB.javaAPI DocGlassfish v2 API4191Wed Jul 11 10:00:58 BST 2007com.sun.enterprise.tools.upgrade.transform.elements

ORB

public class ORB extends BaseElement
author
prakash

Fields Summary
Constructors Summary
public ORB()
Creates a new instance of Element

    
Methods Summary
public voidtransform(org.w3c.dom.Element element, org.w3c.dom.Element parentSource, org.w3c.dom.Element parentResult)
element - orb parentSource - parent iiop-service of element parentResult - parent iiop-service of result

		logger.log(Level.FINE, stringManager.getString("upgrade.transform.transformingMSG", this.getClass().getName(), element.getTagName()));
        NodeList resultORBs = parentResult.getElementsByTagName("orb");
        // There should be one and only one orb.
        Element resultORB = (Element)resultORBs.item(0);
        logger.log(Level.FINE, this.getClass().getName() +  ":: resultORB ", resultORB.getTagName());
        // No need to add attrbitues which are missing.
        this.transferAttributes(element, resultORB, null);
        // Transfer thread-pool related attributes to thread-pool element.
        // Identify right thread-pool
        if(commonInfoModel.getSourceVersion().equals(com.sun.enterprise.tools.upgrade.common.UpgradeConstants.VERSION_7X)){
            String threadPoolAttr = resultORB.getAttribute("use-thread-pool-ids");
            NodeList tPs = parentResult.getOwnerDocument().getElementsByTagName("thread-pool");
            for(int lh =0; lh < tPs.getLength(); lh++){
                Element tpElement = ((Element)tPs.item(lh));
                if(threadPoolAttr.equals(tpElement.getAttribute("thread-pool-id"))){
                    tpElement.setAttribute("max-thread-pool-size", element.getAttribute("max-thread-pool-size"));
                    tpElement.setAttribute("idle-thread-timeout-in-seconds", element.getAttribute("idle-thread-timeout-in-seconds"));
                    break;
                }
            }
        }
        super.transform(element, parentSource, resultORB);