1 23 24 29 30 package com.sun.enterprise.tools.upgrade.transform.elements; 31 32 36 import org.w3c.dom.Document ; 37 import org.w3c.dom.Element ; 38 import org.w3c.dom.NodeList ; 39 import org.w3c.dom.Node ; 40 import com.sun.enterprise.tools.upgrade.transform.ElementToObjectMapper; 41 42 public class ORB extends BaseElement { 43 44 45 public ORB() { 46 } 47 52 public void transform(Element element, Element parentSource, Element parentResult){ 53 NodeList resultORBs = parentResult.getElementsByTagName("orb"); 54 Element resultORB = (Element )resultORBs.item(0); 56 this.transferAttributes(element, resultORB, null); 58 if(commonInfoModel.getSourceVersion().equals(com.sun.enterprise.tools.upgrade.common.UpgradeConstants.VERSION_7X)){ 61 String threadPoolAttr = resultORB.getAttribute("use-thread-pool-ids"); 62 NodeList tPs = parentResult.getOwnerDocument().getElementsByTagName("thread-pool"); 63 for(int lh =0; lh < tPs.getLength(); lh++){ 64 Element tpElement = ((Element )tPs.item(lh)); 65 if(threadPoolAttr.equals(tpElement.getAttribute("thread-pool-id"))){ 66 tpElement.setAttribute("max-thread-pool-size", element.getAttribute("max-thread-pool-size")); 67 tpElement.setAttribute("idle-thread-timeout-in-seconds", element.getAttribute("idle-thread-timeout-in-seconds")); 68 break; 69 } 70 } 71 } 72 super.transform(element, parentSource, resultORB); 73 } 74 75 } 76 | Popular Tags |