EntrepriseBeansRuntimeNodepublic class EntrepriseBeansRuntimeNode extends RuntimeDescriptorNode This node handles runtime deployment descriptors for ejb bundle |
Constructors Summary |
---|
public EntrepriseBeansRuntimeNode()Initializes the child handler;
// we do not care about our standard DDS handles
handlers = null;
registerElementHandler(new XMLElement(RuntimeTagNames.EJB),
EjbNode.class);
registerElementHandler(new XMLElement(RuntimeTagNames.PM_DESCRIPTORS),
PMDescriptorsNode.class);
registerElementHandler(new XMLElement(RuntimeTagNames.CMP_RESOURCE),
CmpResourceNode.class);
registerElementHandler
(new XMLElement(RuntimeTagNames.MESSAGE_DESTINATION),
MessageDestinationRuntimeNode.class);
registerElementHandler
(new XMLElement(WebServicesTagNames.WEB_SERVICE),
WebServiceRuntimeNode.class);
|
Methods Summary |
---|
public java.lang.Object | getDescriptor()
return getParentNode().getDescriptor();
| protected com.sun.enterprise.deployment.node.XMLElement | getXMLRootTag()
return new XMLElement(RuntimeTagNames.EJBS);
| public void | setElementValue(com.sun.enterprise.deployment.node.XMLElement element, java.lang.String value)receives notiification of the value for a particular tag
if (RuntimeTagNames.NAME.equals(element.getQName())) {
DOLUtils.getDefaultLogger().finer("Ignoring runtime bundle name " + value);
return;
}
if (getDescriptor()!=null && RuntimeTagNames.UNIQUE_ID.equals(element.getQName())) {
((EjbBundleDescriptor) getDescriptor()).setUniqueId(Long.parseLong(value));
} else super.setElementValue(element, value);
| public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.EjbBundleDescriptor bundleDescriptor)write the descriptor class to a DOM tree and return it
Node ejbs = super.writeDescriptor(parent, nodeName, bundleDescriptor);
appendTextChild(ejbs, RuntimeTagNames.UNIQUE_ID, String.valueOf(bundleDescriptor.getUniqueId()));
// ejb*
EjbNode ejbNode = new EjbNode();
for (Iterator ejbIterator = bundleDescriptor.getEjbs().iterator();ejbIterator.hasNext();) {
EjbDescriptor ejbDescriptor = (EjbDescriptor) ejbIterator.next();
ejbNode.writeDescriptor(ejbs, RuntimeTagNames.EJB, ejbDescriptor);
}
// pm-descriptors?
PMDescriptorsNode pmsNode = new PMDescriptorsNode();
pmsNode.writeDescriptor(ejbs, RuntimeTagNames.PM_DESCRIPTORS, bundleDescriptor);
// cmpresource?
ResourceReferenceDescriptor rrd = bundleDescriptor.getCMPResourceReference();
if ( rrd != null ) {
CmpResourceNode crn = new CmpResourceNode();
crn.writeDescriptor(ejbs, RuntimeTagNames.CMP_RESOURCE, rrd);
}
// message-destination*
writeMessageDestinationInfo(ejbs, bundleDescriptor);
// webservice-description*
WebServiceRuntimeNode webServiceNode = new WebServiceRuntimeNode();
webServiceNode.writeWebServiceRuntimeInfo(ejbs, bundleDescriptor);
return ejbs;
|
|