1 23 package com.sun.enterprise.deployment.node.ejb; 24 25 import java.util.Map ; 26 import org.w3c.dom.Node ; 27 import org.xml.sax.Attributes ; 28 29 import com.sun.enterprise.deployment.node.XMLElement; 30 import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; 31 import com.sun.enterprise.deployment.node.LocalizedInfoNode; 32 import com.sun.enterprise.deployment.node.MethodNode; 33 import com.sun.enterprise.deployment.node.DescriptorFactory; 34 35 import com.sun.enterprise.deployment.Descriptor; 36 import com.sun.enterprise.deployment.EjbRemovalInfo; 37 38 import com.sun.enterprise.deployment.xml.EjbTagNames; 39 40 public class EjbRemoveNode extends DeploymentDescriptorNode { 41 42 public EjbRemoveNode() { 43 super(); 44 45 registerElementHandler(new XMLElement(EjbTagNames.REMOVE_BEAN_METHOD), MethodNode.class, "setRemoveMethod"); 46 47 } 48 49 55 protected Map getDispatchTable() { 56 Map table = super.getDispatchTable(); 58 table.put(EjbTagNames.REMOVE_RETAIN_IF_EXCEPTION, "setRetainIfException"); 59 return table; 60 } 61 62 70 public Node writeDescriptor(Node parent, String nodeName, EjbRemovalInfo descriptor) { 71 Node removeNode = appendChild(parent, nodeName); 72 73 MethodNode methodNode = new MethodNode(); 74 75 methodNode.writeJavaMethodDescriptor 76 (removeNode, EjbTagNames.REMOVE_BEAN_METHOD, 77 descriptor.getRemoveMethod()); 78 79 appendTextChild(removeNode, EjbTagNames.REMOVE_RETAIN_IF_EXCEPTION, 80 Boolean.toString(descriptor.getRetainIfException())); 81 82 return removeNode; 83 } 84 } 85 | Popular Tags |