1 23 24 29 30 package com.sun.enterprise.deployment.util; 31 32 import java.util.Iterator ; 33 import java.util.Set ; 34 import java.util.logging.Level ; 35 import com.sun.enterprise.deployment.types.MessageDestinationReferencer; 36 import com.sun.enterprise.deployment.MessageDestinationDescriptor; 37 import com.sun.enterprise.deployment.ServiceReferenceDescriptor; 38 import com.sun.enterprise.deployment.ServiceRefPortInfo; 39 import com.sun.enterprise.deployment.WebServiceEndpoint; 40 41 45 public class ComponentValidator extends DefaultDOLVisitor implements ComponentVisitor { 46 47 52 public void accept(MessageDestinationReferencer msgDestReferencer) { 53 54 if( msgDestReferencer.isLinkedToMessageDestination() ) { 56 return; 57 } else if (msgDestReferencer.ownedByMessageDestinationRef() && 59 msgDestReferencer.getMessageDestinationRefOwner( 60 ).getJndiName() != null) { 61 return; 62 } else { 63 MessageDestinationDescriptor msgDest = 64 msgDestReferencer.resolveLinkName(); 65 if( msgDest == null ) { 66 String linkName = 67 msgDestReferencer.getMessageDestinationLinkName(); 68 DOLUtils.getDefaultLogger().log(Level.WARNING, "enterprise.deployment.backend.invalidDescriptorMappingFailure", 69 new Object [] {"message-destination", linkName}); 70 } 71 } 72 } 73 74 79 public void accept(ServiceReferenceDescriptor serviceRef) { 80 81 Set portsInfo = serviceRef.getPortsInfo(); 82 83 for(Iterator iter = portsInfo.iterator(); iter.hasNext();) { 84 ServiceRefPortInfo next = (ServiceRefPortInfo) iter.next(); 85 86 if( next.hasPortComponentLinkName() && 87 !next.isLinkedToPortComponent() ) { 88 WebServiceEndpoint portComponentLink = next.resolveLinkName(); 89 if( portComponentLink == null ) { 90 String linkName = next.getPortComponentLinkName(); 91 DOLUtils.getDefaultLogger().log(Level.WARNING, "enterprise.deployment.backend.invalidDescriptorMappingFailure", 92 new Object [] {"port-component" , linkName}); 93 } 94 } 95 96 } 97 } 98 99 } 100 | Popular Tags |