1 23 package com.sun.enterprise.deployment.node.ejb; 24 25 import java.util.Map ; 26 import org.w3c.dom.Node ; 27 28 import com.sun.enterprise.deployment.node.XMLElement; 29 import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; 30 import com.sun.enterprise.deployment.node.LocalizedInfoNode; 31 import com.sun.enterprise.deployment.node.MethodNode; 32 import com.sun.enterprise.deployment.node.DescriptorFactory; 33 34 import com.sun.enterprise.deployment.Descriptor; 35 import com.sun.enterprise.deployment.EjbInitInfo; 36 import com.sun.enterprise.deployment.MethodDescriptor; 37 38 import com.sun.enterprise.deployment.xml.EjbTagNames; 39 40 public class EjbInitNode extends DeploymentDescriptorNode { 41 42 public EjbInitNode() { 43 super(); 44 45 registerElementHandler(new XMLElement(EjbTagNames.INIT_CREATE_METHOD), MethodNode.class, "setCreateMethod"); 46 registerElementHandler(new XMLElement(EjbTagNames.INIT_BEAN_METHOD), MethodNode.class, "setBeanMethod"); 47 48 49 } 50 51 57 protected Map getDispatchTable() { 58 Map table = super.getDispatchTable(); 60 return table; 61 } 62 63 71 public Node writeDescriptor(Node parent, String nodeName, EjbInitInfo initMethod) { 72 Node initNode = appendChild(parent, nodeName); 73 MethodNode methodNode = new MethodNode(); 74 75 methodNode.writeJavaMethodDescriptor 76 (initNode, EjbTagNames.INIT_CREATE_METHOD, 77 initMethod.getCreateMethod()); 78 79 methodNode.writeJavaMethodDescriptor 80 (initNode, EjbTagNames.INIT_BEAN_METHOD, 81 initMethod.getBeanMethod()); 82 83 return initNode; 84 } 85 } 86 | Popular Tags |