Search in sources :

Example 1 with MessageDestinationReferenceContainer

use of com.sun.enterprise.deployment.types.MessageDestinationReferenceContainer in project Payara by payara.

the class MessageDestinationRefNode method setElementValue.

@Override
public void setElementValue(XMLElement element, String value) {
    if (TagNames.MESSAGE_DESTINATION_REFERENCE_NAME.equals(element.getQName())) {
        XMLNode parentNode = getParentNode();
        Object parentDesc = null;
        // in case of web
        if (parentNode.getDescriptor() instanceof WebBundleDescriptor) {
            parentDesc = parentNode.getDescriptor();
        // 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);
}
Also used : MessageDestinationReferenceContainer(com.sun.enterprise.deployment.types.MessageDestinationReferenceContainer) XMLNode(com.sun.enterprise.deployment.node.XMLNode) WebBundleDescriptor(com.sun.enterprise.deployment.WebBundleDescriptor)

Aggregations

WebBundleDescriptor (com.sun.enterprise.deployment.WebBundleDescriptor)1 XMLNode (com.sun.enterprise.deployment.node.XMLNode)1 MessageDestinationReferenceContainer (com.sun.enterprise.deployment.types.MessageDestinationReferenceContainer)1