FileDocCategorySizeDatePackage
MDBResourceAdapterNode.javaAPI DocGlassfish v2 API4495Fri May 04 22:31:42 BST 2007com.sun.enterprise.deployment.node.runtime

MDBResourceAdapterNode

public class MDBResourceAdapterNode extends com.sun.enterprise.deployment.node.DeploymentDescriptorNode
This class is responsible for handling the runtime resource adapter configuration for the message-driven bean
author
Qingqing Ouyang
version

Fields Summary
Constructors Summary
public MDBResourceAdapterNode()

        registerElementHandler(
                new XMLElement(RuntimeTagNames.ACTIVATION_CONFIG),
                ActivationConfigNode.class);
                //"setRuntimeActivationConfigDescriptor");
    
Methods Summary
public java.lang.ObjectgetDescriptor()

return
the descriptor instance to associate with this XMLNode

        return getParentNode().getDescriptor();
    
protected java.util.MapgetDispatchTable()
all sub-implementation of this class can use a dispatch table to map xml element to method name on the descriptor class for setting the element value.

return
the map with the element name as a key, the setter method as a value

        // no need to be synchronized for now
        Map table =  new HashMap();
        table.put(RuntimeTagNames.RESOURCE_ADAPTER_MID, "setResourceAdapterMid");
        return table;
    
public org.w3c.dom.NodewriteDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.EjbMessageBeanDescriptor descriptor)
write the ejbmessage descriptor class to a DOM tree and return it

param
parent node in the DOM tree
param
node name for the root element of this xml fragment
param
the descriptor to write
return
the DOM tree top node


        Node raNode = super.writeDescriptor(parent, nodeName, descriptor);
        appendTextChild(raNode, RuntimeTagNames.RESOURCE_ADAPTER_MID, 
                descriptor.getResourceAdapterMid()); 

        ActivationConfigNode activationConfigNode = new ActivationConfigNode();
        activationConfigNode.writeDescriptor
            (raNode, RuntimeTagNames.ACTIVATION_CONFIG,
             descriptor.getRuntimeActivationConfigDescriptor());
        return raNode;