MessageDestinationRefNodepublic class MessageDestinationRefNode extends com.sun.enterprise.deployment.node.DeploymentDescriptorNode This node is responsible for handling runtime descriptor
message-destination-ref tag |
Fields Summary |
---|
private com.sun.enterprise.deployment.MessageDestinationReferenceDescriptor | descriptor |
Methods Summary |
---|
public java.lang.Object | getDescriptor()
return descriptor;
| protected java.util.Map | getDispatchTable()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.
Map table = super.getDispatchTable();
table.put(RuntimeTagNames.JNDI_NAME, "setJndiName");
return table;
| 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.MESSAGE_DESTINATION_REFERENCE_NAME.equals(
element.getQName())) {
Object parentNode = getParentNode();
Object parentDesc = null;
// in case of web
if (parentNode instanceof WebBundleRuntimeNode) {
parentDesc = ((WebBundleRuntimeNode) parentNode).getWebBundleDescriptor();
// in case of appclient and ejb
} else {
parentDesc = getParentNode().getDescriptor();
}
if (parentDesc instanceof MessageDestinationReferenceContainer) {
try {
descriptor = ((MessageDestinationReferenceContainer) parentDesc).getMessageDestinationReferenceByName(value);
} catch (IllegalArgumentException iae) {
DOLUtils.getDefaultLogger().warning(iae.getMessage());
}
}
} else super.setElementValue(element, value);
| public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.MessageDestinationReferenceDescriptor msgDestRef)write the descriptor class to a DOM tree and return it
Node msgDestRefNode = super.writeDescriptor(parent, nodeName,
msgDestRef);
appendTextChild(msgDestRefNode,
RuntimeTagNames.MESSAGE_DESTINATION_REFERENCE_NAME,
msgDestRef.getName());
appendTextChild(msgDestRefNode, RuntimeTagNames.JNDI_NAME,
msgDestRef.getJndiName());
return msgDestRefNode;
| public static void | writeMessageDestinationReferences(org.w3c.dom.Node parent, com.sun.enterprise.deployment.types.MessageDestinationReferenceContainer descriptor)writes all the runtime information for JMS destination references
// message-destination-ref*
Iterator msgDestRefs =
descriptor.getMessageDestinationReferenceDescriptors().iterator();
if (msgDestRefs.hasNext()) {
MessageDestinationRefNode messageDestinationRefNode =
new MessageDestinationRefNode();
while (msgDestRefs.hasNext()) {
messageDestinationRefNode.writeDescriptor(parent,
RuntimeTagNames.MESSAGE_DESTINATION_REFERENCE,
(MessageDestinationReferenceDescriptor) msgDestRefs.next());
}
}
|
|