1 23 package com.sun.enterprise.deployment.node.runtime; 24 25 import java.util.Map ; 26 import org.w3c.dom.Node ; 27 28 import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; 29 import com.sun.enterprise.deployment.runtime.BeanPoolDescriptor; 30 import com.sun.enterprise.deployment.xml.RuntimeTagNames; 31 32 38 public class BeanPoolNode extends DeploymentDescriptorNode { 39 40 protected BeanPoolDescriptor descriptor=null; 41 42 45 public Object getDescriptor() { 46 if (descriptor==null) { 47 descriptor = new BeanPoolDescriptor(); 48 } 49 return descriptor; 50 } 51 52 58 protected Map getDispatchTable() { 59 Map dispatchTable = super.getDispatchTable(); 60 dispatchTable.put(RuntimeTagNames.STEADY_POOL_SIZE, "setSteadyPoolSize"); 61 dispatchTable.put(RuntimeTagNames.POOL_RESIZE_QUANTITY, "setPoolResizeQuantity"); 62 dispatchTable.put(RuntimeTagNames.MAX_POOL_SIZE, "setMaxPoolSize"); 63 dispatchTable.put(RuntimeTagNames.POOL_IDLE_TIMEOUT_IN_SECONDS, "setPoolIdleTimeoutInSeconds"); 64 dispatchTable.put(RuntimeTagNames.MAX_WAIT_TIME_IN_MILLIS, "setMaxWaitTimeInMillis"); 65 return dispatchTable; 66 } 67 68 76 public Node writeDescriptor(Node parent, String nodeName, BeanPoolDescriptor descriptor) { 77 Node beanpoolNode = super.writeDescriptor(parent, nodeName, descriptor); 78 appendTextChild(beanpoolNode, RuntimeTagNames.STEADY_POOL_SIZE, descriptor.getSteadyPoolSize()); 79 appendTextChild(beanpoolNode, RuntimeTagNames.POOL_RESIZE_QUANTITY, descriptor.getPoolResizeQuantity()); 80 appendTextChild(beanpoolNode, RuntimeTagNames.MAX_POOL_SIZE, descriptor.getMaxPoolSize()); 81 appendTextChild(beanpoolNode, RuntimeTagNames.POOL_IDLE_TIMEOUT_IN_SECONDS, descriptor.getPoolIdleTimeoutInSeconds()); 82 appendTextChild(beanpoolNode, RuntimeTagNames.MAX_WAIT_TIME_IN_MILLIS, descriptor.getMaxWaitTimeInMillis()); 83 return beanpoolNode; 84 } 85 } 86 | Popular Tags |