public void addMessageDestinationReferenceDescriptor (MessageDestinationReferenceDescriptor msgDestReference) { getMessageDestinationReferenceContainer( ).addMessageDestinationReferenceDescriptor(msgDestReference); }
public MessageDestinationReferenceDescriptor getMessageDestinationReference (String name) { MessageDestinationReferenceDescriptor msgDestRef = null; try { msgDestRef = getMessageDestinationReferenceContainer(). getMessageDestinationReferenceByName(name); // annotation has a corresponding message-destination-ref // in xml. Just add annotation info and continue. // This logic might change depending on overriding rules // and order in which annotations are read w.r.t. to xml. // E.g. sparse overriding in xml or loading annotations // first. } catch(IllegalArgumentException e) { // DOL API is (unfortunately) defined to return // IllegalStateException if name doesn't exist. } return msgDestRef; }
/** * writes all the runtime information for JMS destination references * * @param parent node to add the runtime xml info * @param the J2EE component containing message destination references */ public static void writeMessageDestinationReferences(Node parent, MessageDestinationReferenceContainer descriptor) { // message-destination-ref* Iterator msgDestRefs = descriptor.getMessageDestinationReferenceDescriptors().iterator(); if (msgDestRefs.hasNext()) { MessageDestinationRefNode messageDestinationRefNode = new MessageDestinationRefNode(); while (msgDestRefs.hasNext()) { messageDestinationRefNode.writeDescriptor(parent, TagNames.MESSAGE_DESTINATION_REFERENCE, (MessageDestinationReferenceDescriptor) msgDestRefs.next()); } } } }
/** * writes all the runtime information for JMS destination references * * @param parent node to add the runtime xml info * @param the J2EE component containing message destination references */ public static void writeMessageDestinationReferences(Node parent, MessageDestinationReferenceContainer descriptor) { // 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()); } } } }
public MessageDestinationReferenceDescriptor getMessageDestinationReference (String name) { MessageDestinationReferenceDescriptor msgDestRef = null; try { msgDestRef = getMessageDestinationReferenceContainer(). getMessageDestinationReferenceByName(name); // annotation has a corresponding message-destination-ref // in xml. Just add annotation info and continue. // This logic might change depending on overriding rules // and order in which annotations are read w.r.t. to xml. // E.g. sparse overriding in xml or loading annotations // first. } catch(IllegalArgumentException e) { // DOL API is (unfortunately) defined to return // IllegalStateException if name doesn't exist. } return msgDestRef; }
public void addMessageDestinationReferenceDescriptor (MessageDestinationReferenceDescriptor msgDestReference) { getMessageDestinationReferenceContainer( ).addMessageDestinationReferenceDescriptor(msgDestReference); }
@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); }
/** * receives notiification of the value for a particular tag * * @param element the xml element * @param value it's associated value */ public void setElementValue(XMLElement element, String value) { 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); }