1 23 package com.sun.enterprise.deployment.node.runtime; 24 25 import java.util.Map ; 26 import java.util.HashMap ; 27 import java.util.Iterator ; 28 import org.w3c.dom.Node ; 29 30 import com.sun.enterprise.deployment.node.XMLElement; 31 import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; 32 33 import com.sun.enterprise.deployment.Descriptor; 34 import com.sun.enterprise.deployment.EjbMessageBeanDescriptor; 35 import com.sun.enterprise.deployment.xml.RuntimeTagNames; 36 37 44 public class MDBResourceAdapterNode extends DeploymentDescriptorNode { 45 46 public MDBResourceAdapterNode() { 47 registerElementHandler( 48 new XMLElement(RuntimeTagNames.ACTIVATION_CONFIG), 49 ActivationConfigNode.class); 50 } 52 53 56 public Object getDescriptor() { 57 return getParentNode().getDescriptor(); 58 } 59 60 61 69 protected Map getDispatchTable() { 70 Map table = new HashMap (); 72 table.put(RuntimeTagNames.RESOURCE_ADAPTER_MID, "setResourceAdapterMid"); 73 return table; 74 } 75 76 84 public Node writeDescriptor( Node parent, 85 String nodeName, EjbMessageBeanDescriptor descriptor) { 86 87 Node raNode = super.writeDescriptor(parent, nodeName, descriptor); 88 appendTextChild(raNode, RuntimeTagNames.RESOURCE_ADAPTER_MID, 89 descriptor.getResourceAdapterMid()); 90 91 ActivationConfigNode activationConfigNode = new ActivationConfigNode(); 92 activationConfigNode.writeDescriptor 93 (raNode, RuntimeTagNames.ACTIVATION_CONFIG, 94 descriptor.getRuntimeActivationConfigDescriptor()); 95 return raNode; 96 } 97 } 98 | Popular Tags |