/**
  * write the descriptor class to a DOM tree and return it
  *
  * @param parent node for the DOM tree
  * @param node name for the descriptor
  * @param the descriptor to write
  * @return the DOM tree top node
  */
 public Node writeDescriptor(Node parent, String nodeName, MdbConnectionFactoryDescriptor mcf) {
   Node mcfNode = super.writeDescriptor(parent, nodeName, mcf);
   appendTextChild(mcfNode, RuntimeTagNames.JNDI_NAME, mcf.getJndiName());
   if (mcf.getDefaultResourcePrincipal() != null) {
     DefaultResourcePrincipalNode subNode = new DefaultResourcePrincipalNode();
     subNode.writeDescriptor(
         mcfNode, RuntimeTagNames.DEFAULT_RESOURCE_PRINCIPAL, mcf.getDefaultResourcePrincipal());
   }
   return mcfNode;
 }
 /**
  * Adds a new DOL descriptor instance to the descriptor instance associated with this XMLNode
  *
  * @param descriptor the new descriptor
  */
 public void addDescriptor(Object newDescriptor) {
   if (newDescriptor instanceof ResourcePrincipal) {
     descriptor.setDefaultResourcePrincipal((ResourcePrincipal) newDescriptor);
   } else super.addDescriptor(newDescriptor);
 }