/** * Visits a message destination referencer for the last J2EE * component visited * @param the message destination referencer */ public void accept(MessageDestinationReferencer msgDestReferencer) { // if it is linked to a logical destination if( msgDestReferencer.isLinkedToMessageDestination() ) { return; // if it is referred to a physical destination } else if (msgDestReferencer.ownedByMessageDestinationRef() && msgDestReferencer.getMessageDestinationRefOwner( ).getJndiName() != null) { return; } else { MessageDestinationDescriptor msgDest = msgDestReferencer.resolveLinkName(); if( msgDest == null ) { String linkName = msgDestReferencer.getMessageDestinationLinkName(); DOLUtils.getDefaultLogger().log(Level.WARNING, "enterprise.deployment.backend.invalidDescriptorMappingFailure", new Object[] {"message-destination", linkName}); } else { if (msgDestReferencer instanceof MessageDestinationReferenceDescriptor) { ((MessageDestinationReferenceDescriptor)msgDestReferencer).setJndiName(msgDest.getJndiName()); } } } }
/** * Visits a message destination referencer for the last J2EE * component visited * @param the message destination referencer */ @Override protected void accept(MessageDestinationReferencer msgDestReferencer) { // if it is linked to a logical destination if( msgDestReferencer.isLinkedToMessageDestination() ) { return; // if it is referred to a physical destination } else if (msgDestReferencer.ownedByMessageDestinationRef() && msgDestReferencer.getMessageDestinationRefOwner( ).getJndiName() != null) { return; } else { MessageDestinationDescriptor msgDest = msgDestReferencer.resolveLinkName(); if( msgDest == null ) { String linkName = msgDestReferencer.getMessageDestinationLinkName(); DOLUtils.getDefaultLogger().log(Level.WARNING, DOLUtils.INVALID_DESC_MAPPING, new Object[] {"message-destination", linkName}); } else { if (msgDestReferencer instanceof MessageDestinationReferenceDescriptor) { ((MessageDestinationReferenceDescriptor)msgDestReferencer).setJndiName(msgDest.getJndiName()); } } } }