FileDocCategorySizeDatePackage
ComponentValidator.javaAPI DocGlassfish v2 API4754Fri May 04 22:31:58 BST 2007com.sun.enterprise.deployment.util

ComponentValidator

public class ComponentValidator extends DefaultDOLVisitor implements ComponentVisitor
author
dochez

Fields Summary
Constructors Summary
Methods Summary
public voidaccept(com.sun.enterprise.deployment.types.MessageDestinationReferencer msgDestReferencer)
Visits a message destination referencer for the last J2EE component visited

param
the message destination referencer


        // 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});
            }                                                   
        }
    
public voidaccept(com.sun.enterprise.deployment.ServiceReferenceDescriptor serviceRef)
Visits a service reference for the last J2EE component visited

param
the service reference


        Set portsInfo = serviceRef.getPortsInfo();

        for(Iterator iter = portsInfo.iterator(); iter.hasNext();) {
            ServiceRefPortInfo next = (ServiceRefPortInfo) iter.next();

            if( next.hasPortComponentLinkName() &&
                !next.isLinkedToPortComponent() ) {
                WebServiceEndpoint portComponentLink = next.resolveLinkName();
                if( portComponentLink == null ) {
                    String linkName = next.getPortComponentLinkName(); 
                    DOLUtils.getDefaultLogger().log(Level.WARNING, "enterprise.deployment.backend.invalidDescriptorMappingFailure",
                        new Object[] {"port-component" , linkName});
                }                                                   
            }

        }