Package com.sun.enterprise.tools.verifier

Examples of com.sun.enterprise.tools.verifier.Result


public class ASEjbBCResizeQuantity extends ASEjbBeanCache
{
   
    public Result check(EjbDescriptor descriptor)
    {
        Result result = getInitializedResult();
        ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
        String beanCache = null;
        String resizeQty = null;
        String maxCacheSize = null;
        try{
            beanCache = getXPathValue("/sun-ejb-jar/enterprise-beans/ejb[ejb-name=\""+descriptor.getName()+"\"]/bean-cache");
            if(beanCache!=null)
            {
                try
                {
                    resizeQty = getXPathValue("/sun-ejb-jar/enterprise-beans/ejb[ejb-name=\""+descriptor.getName()+"\"]/bean-cache/resize-quantity");
                    if (resizeQty!=null)
                    {
                        resizeQty = resizeQty.trim();
                        if (resizeQty.length()==0)
                        {
                            addErrorDetails(result, compName);
                            result.failed(smh.getLocalString(getClass().getName()+".failed",
                                "FAILED [AS-EJB bean-cache] : resize-quantity cannot be empty"));

                        }else
                        {
                            int resizeQtyVal = Integer.valueOf(resizeQty).intValue();
                            if (resizeQtyVal < || resizeQtyVal > Integer.MAX_VALUE)
                            {
                              addErrorDetails(result, compName);
                              result.failed(smh.getLocalString(getClass().getName()+".failed1",
                                    "FAILED [AS-EJB bean-cache] : resize-quantity cannot be less than 1 or greater than {0}", new Object[]{new Integer(Integer.MAX_VALUE)}));
                            }else
                            {
                                int cacheSizeVal=0;
                                maxCacheSize = getXPathValue("/sun-ejb-jar/enterprise-beans/ejb[ejb-name=\""+descriptor.getName()+"\"]/bean-cache/max-cache-size");
                                if (maxCacheSize!=null)
                                {
                                    try{
                                        cacheSizeVal = Integer.valueOf(maxCacheSize).intValue();

                                    }catch(NumberFormatException nfe){
                                        addErrorDetails(result, compName);
                                        result.failed(smh.getLocalString(getClass().getName()+".failed2",
                                            "FAILED [AS-EJB bean-cache] : The value [ {0} ] for max-cache-size is not a valid Integer number",
                                            new Object[]{maxCacheSize}));
                                        return result;
                                    }
                                    if (cacheSizeVal >= 1 && cacheSizeVal <= Integer.MAX_VALUE)
                                    {
                                        if (resizeQtyVal <= cacheSizeVal)
                                        {
                                            addGoodDetails(result, compName);
                                            result.passed(smh.getLocalString(getClass().getName()+".passed",
                                                "PASSED [AS-EJB bean-cache] : resize-quantity is {0} and is less than max-cache-size {1}",
                                                 new Object[]{(new Integer(resizeQty)),new Integer(maxCacheSize)}));
                                        }
                                        else
                                        {
                                            addErrorDetails(result, compName);
                                            result.failed(smh.getLocalString(getClass().getName()+".failed3",
                                                    "FAILED[AS-EJB bean-cache] : resize-quantity {0} should be less than max-cache-size {1}",
                                                    new Object[]{new Integer(resizeQty), new Integer(maxCacheSize)}));
                                        }
                                    }else
                                    {
                                        addErrorDetails(result, compName);
                                        result.failed(smh.getLocalString(getClass().getName()+".failed4",
                                                "FAILED [AS-EJB" +"bean-cache] : resize-quantity should be less than max-cache-size and max-cache-size is not a valid integer"));

                                    }
                                }else
                                {
                                    addGoodDetails(result, compName);
                                    result.passed(smh.getLocalString(getClass().getName()+".passed1",
                                        "PASSED [AS-EJB bean-cache] : resize-quantity is {0}",
                                         new Object[]{(new Integer(resizeQty))}));
                                }
                            }
                        }

                    }else // resize-quantity not defined
                    {
                        addNaDetails(result, compName);
                        result.notApplicable(smh.getLocalString(getClass().getName()+".notApplicable",
                          "NOT APPLICABLE [AS-EJB bean-cache] : resize-quantity element is not defined"));

                    }
                }catch(NumberFormatException nfex)
                {
                    Verifier.debug(nfex);
                    addErrorDetails(result, compName);
                    result.failed(smh.getLocalString(getClass().getName()+".failed5",
                            "FAILED [AS-EJB bean-cache] : The value [ {0} ] for resize-quantity is not a valid Integer number",
                            new Object[]{resizeQty}));


                }
            }else //bean-cache element not defined
            {
                addNaDetails(result, compName);
                result.notApplicable(smh.getLocalString(getClass().getName()+".notApplicable1",
                    "NOT APPLICABLE [AS-EJB] : bean-cache element not defined"));

            }
    }catch(Exception ex)
    {
        addErrorDetails(result, compName);
        result.addErrorDetails(smh.getLocalString
                (getClass().getName() + ".notRun",
                        "NOT RUN [AS-EJB] : Could not create the descriptor object"));
    }
        return result;
    }
View Full Code Here


     * @paramm descriptor deployment descriptor for the rar file
     * @return result object containing the result of the individual test
     * performed
     */
    public Result check(ConnectorDescriptor descriptor) {
        Result result = getInitializedResult();
  ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
       
//        File f=Verifier.getArchiveFile(descriptor.getModuleDescriptor().getArchiveUri());    
        Class c = findImplementorOf(descriptor, "javax.resource.spi.ConnectionRequestInfo");
        if (c == null) {
            result.addNaDetails(smh.getLocalString
          ("tests.componentNameConstructor",
           "For [ {0} ]",
           new Object[] {compName.toString()}))
            result.notApplicable(smh.getLocalString
      ("com.sun.enterprise.tools.verifier.tests.connector.ConnectorTest.optionalInterfaceMissing",
            "Warning: There is no implementation of the optional [ {0} ] interface",
            new Object[] {"javax.resource.spi.ConnectionRequestInfo"}))
        } else {
            // An implementation of the interface is provided, let's check the equals method
View Full Code Here

public class ASEjbJndiName extends EjbTest implements EjbCheck {

    boolean oneFailed = false;
    boolean oneWarning = false;
    public Result check(EjbDescriptor descriptor) {
        Result result = getInitializedResult();
        ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
        String ejbName = null, jndiName=null;
        ejbName = descriptor.getName();     //get ejb-name
        jndiName=getXPathValue("/sun-ejb-jar/enterprise-beans/ejb/jndi-name");
        if(jndiName != null){
            if(jndiName.trim().length()==0){
                check(result, descriptor, compName);
            }else{
                addGoodDetails(result, compName);
                result.passed(smh.getLocalString(getClass().getName()+".passed",
                        "PASSED [AS-EJB ejb] : jndi-name is {0}", new Object[]{jndiName}));
            }
        }else
            check(result, descriptor, compName);

        if(oneFailed)
            result.setStatus(Result.FAILED);
        else if(oneWarning)
            result.setStatus(Result.WARNING);
        return result;

    }
View Full Code Here

     * @return result object containing the result of the individual test
     * performed
     */
    public Result check(ConnectorDescriptor descriptor) {
               
        Result result = getInitializedResult();
  ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
        if(!descriptor.getOutBoundDefined())
        {
          result.addNaDetails(smh.getLocalString
              ("tests.componentNameConstructor",
               "For [ {0} ]",
               new Object[] {compName.toString()}));
          result.notApplicable(smh.getLocalString
              ("com.sun.enterprise.tools.verifier.tests.connector.managed.notApplicableForInboundRA",
               "Resource Adapter does not provide outbound communication"));
          return result;
        }
        String connectorTransactionSupport =
        descriptor.getOutboundResourceAdapter().getTransSupport();
       
        // No transaction support specified, this is an error
        if (connectorTransactionSupport==null) {
      result.addErrorDetails(smh.getLocalString
           ("tests.componentNameConstructor",
            "For [ {0} ]",
            new Object[] {compName.toString()}));
      result.failed(smh.getLocalString
        ("com.sun.enterprise.tools.verifier.tests.connector.TransactionSupport.nonexist",
         "Error: No Transaction support specified for ressource adapter",
         new Object[] {connectorTransactionSupport}));       
            return result;
        }       
       
        // get the rar file handle
       // File jarFile = Verifier.getJarFile(descriptor.getModuleDescriptor().getArchiveUri());
       
//        File f=Verifier.getArchiveFile(descriptor.getModuleDescriptor().getArchiveUri());
        if (connectorTransactionSupport.equals(ConnectorTagNames.DD_NO_TRANSACTION)) {
            boolean oneFailed=false;
            if (findImplementorOf(descriptor, "javax.resource.spi.LocalTransaction")!=null) {
                oneFailed = true;
    result.addWarningDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}));
                result.warning(smh.getLocalString(getClass().getName() + ".warning",
                "Warning: Transaction support {0} is specified for ressource adapter but [ {1} ] is implemented",
    new Object[] {"NoTransaction", "javax.resource.spi.LocalTransaction"}));    
            }
            if (findImplementorOf(descriptor, "javax.transaction.xa.XAResource")!=null) {
                oneFailed = true;
    result.addWarningDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}));
                result.warning(smh.getLocalString(getClass().getName() + ".warning",
                "Warning: Transaction support {0} is specified for ressource adapter but [ {1} ] is implemented",
    new Object[] {"NoTransaction", "javax.transaction.xa.XAResource"}));    
            }
            if (!oneFailed) {
                result.addGoodDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}))
    result.passed(smh.getLocalString(getClass().getName() + ".passed1",
                    "Transaction support NoTransaction is specified for ressource adapter and [ {0} ] are not implemented",
                    new Object[] {"javax.transaction.xa.XAResource, javax.resource.spi.LocalTransaction"}));                         
            }
        }
        else {
            if (connectorTransactionSupport.equals(ConnectorTagNames.DD_LOCAL_TRANSACTION)) {
                if (findImplementorOf(descriptor, "javax.resource.spi.LocalTransaction")==null) {
                    result.addErrorDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}));
    result.failed(smh.getLocalString(getClass().getName() + ".nonexist",
                    "Error: Transaction support {0} is specified for ressource adapter but [ {1} ] is not implemented",
        new Object[] {"LocalTransaction", "javax.resource.spi.LocalTransaction"}));    
                } else {               
                    if (findImplementorOf(descriptor, "javax.transaction.xa.XAResource")!=null) {
      result.addWarningDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}));
                        result.addWarningDetails(smh.getLocalString(getClass().getName() + ".warning",
                        "Warning: Transaction support {0} is specified for ressource adapter but [ {1} ] is implemented",
                    new Object[] {"LocalTransaction", "javax.transaction.xa.XAResource"}));    
                    } else {
                        result.addGoodDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}));
      result.passed(smh.getLocalString(getClass().getName() + ".passed2",
                            "Transaction support {0} is specified for ressource adapter and [ {1} ] is(are) implemented",
                    new Object[] {"LocalTransaction", "javax.resource.spi.LocalTransaction"}));                            
                    }
                }                           
            } else {
                if (connectorTransactionSupport.equals(ConnectorTagNames.DD_XA_TRANSACTION)) {
                    boolean oneFailed = false;
                    if (findImplementorOf(descriptor, "javax.resource.spi.LocalTransaction")==null) {
                        oneFailed = true;
                        result.addErrorDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}));
      result.failed(smh.getLocalString(getClass().getName() + ".nonexist",
                        "Error: Transaction support {0} is specified for ressource adapter but [ {1} ] is not implemented",
            new Object[] {"XATransaction", "javax.resource.spi.LocalTransaction"}));                        
                    }
                    if (findImplementorOf(descriptor, "javax.transaction.xa.XAResource")==null) {
                        oneFailed = true;
                        result.addErrorDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}));
      result.failed(smh.getLocalString(getClass().getName() + ".nonexist",
                        "Error: Transaction support {0} is specified for ressource adapter but [ {1} ] is not implemented",
            new Object[] {"XATransaction", "javax.transaction.xa.XAResource"}));                        
                    }
                    if (!oneFailed) {
                        result.addGoodDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}));
      result.passed(smh.getLocalString(getClass().getName() + ".passed2",
                            "Transaction support {0} is specified for ressource adapter and [ {1} ] is(are) implemented",
                            new Object[] {"XATransaction", "javax.transaction.xa.Transaction, javax.resource.spi.LocalTransaction"}));                              
                    }
                } else {
                    // unknow transaction support
              result.addErrorDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}));
        result.failed(smh.getLocalString
                  ("com.sun.enterprise.tools.verifier.tests.connector.TransactionSupport.failed",
                        "Error: Deployment descriptor transaction-support [ {0} ] for ressource adapter is not valid",
            new Object[] {connectorTransactionSupport}));                       
                }
            }
View Full Code Here

public class ASCmpMappingTest extends EjbTest implements EjbCheck {

    public Result check(EjbDescriptor descriptor)
    {
        Result result = getInitializedResult();
        ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
        try {
            if (descriptor instanceof IASEjbCMPEntityDescriptor) {
                Collection col = null;
                if(getVerifierContext().getJDOException()!=null){
                    result.addErrorDetails(smh.getLocalString
                            ("tests.componentNameConstructor",
                                    "For [ {0} ]",
                                    new Object[] {compName.toString()}));
                    result.failed (smh.getLocalString(getClass().getName() + ".failed1",
                            "Error: Exception [ {0} ] while initializing JDOCodeGenerator. Please check your descriptors and mapping files for consistency ",
                            new Object[] {getVerifierContext().getJDOException().getMessage()}));

                    return result;
                }else{
                    try{
                        JDOCodeGenerator jdc= getVerifierContext().getJDOCodeGenerator();
                        col = jdc.validate((IASEjbCMPEntityDescriptor)descriptor);
                    }catch(Exception ex){
                        result.addErrorDetails(smh.getLocalString
                                ("tests.componentNameConstructor",
                                        "For [ {0} ]",
                                        new Object[] {compName.toString()}));
                        result.failed (smh.getLocalString(getClass().getName() + ".failed",
                                "Error: Exception [ {0} ] when calling JDOCodeGenerator.validate().",
                                new Object[] {ex.getMessage()}));
                        return result;
                    }
                }
                if (col.isEmpty()){
                    result.addGoodDetails(smh.getLocalString
                            ("tests.componentNameConstructor",
                                    "For [ {0} ]",
                                    new Object[] {compName.toString()}));
                    result.passed(smh.getLocalString(getClass().getName() + ".passed",
                            "The mappings for the cmp beans (if any) are correct."));
                }else {
                    // collect all the cmpmapping related errors
                    String allErrors = null;
                    Iterator it = col.iterator();
                    while (it.hasNext()) {
                        Exception e = (Exception)it.next();
                        if (!(e instanceof EJBQLException)) {
                            allErrors = e.getMessage() + "\n\n";
                        }
                    }
                    if (allErrors != null) {
                        result.addErrorDetails(smh.getLocalString
                                ("tests.componentNameConstructor",
                                        "For [ {0} ]",
                                        new Object[] {compName.toString()}));
                        result.failed(smh.getLocalString(getClass().getName() + ".parseError",
                                "Error: Entity bean [ {0} ] has the following error(s) [ {1} ]."
                                , new Object[] {descriptor.getEjbClassName(), "\n" + allErrors} ));
                    }
                    else {
                        result.addGoodDetails(smh.getLocalString
                                ("tests.componentNameConstructor",
                                        "For [ {0} ]",
                                        new Object[] {compName.toString()}));
                        result.passed(smh.getLocalString(getClass().getName() + ".passed",
                                "The mappings for the cmp beans (if any) are correct."));
                    }
                  }
            } else
            {
                result.addNaDetails(smh.getLocalString
                        ("tests.componentNameConstructor",
                                "For [ {0} ]",
                                new Object[] {compName.toString()}));
                result.notApplicable(smh.getLocalString(getClass().getName() + ".notApplicable",
                        "Not applicable: Test only applies to container managed EJBs"));
            }
        } catch(Exception e) {
            result.addErrorDetails(smh.getLocalString
                    ("tests.componentNameConstructor",
                            "For [ {0} ]",
                            new Object[] {compName.toString()}));
            result.failed (smh.getLocalString(getClass().getName() + ".failed",
                    "Error: Exception [ {0} ] when calling JDOCodeGenerator.validate().",
                    new Object[] {e.getMessage()}));
        }
        return result;
    }
View Full Code Here

     * @return result object containing the result of the individual test
     * performed
     */
    public Result check(ConnectorDescriptor descriptor) {
       
        Result result = getInitializedResult();
  ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
        Set properties = descriptor.getConfigProperties();
        Iterator iterator = properties.iterator();
        // let's add the propery name
        HashSet<String> hs = new HashSet<String>();
        while (iterator.hasNext()) {
            EnvironmentProperty ep = (EnvironmentProperty) iterator.next();
            if (hs.add(ep.getName())==false) {
                // duplicate name...
                result.addErrorDetails(smh.getLocalString
               ("tests.componentNameConstructor",
          "For [ {0} ]",
          new Object[] {compName.toString()}));
    result.failed(smh.getLocalString(getClass().getName() + ".failed",
                "Error: More than one propery has a duplicate name [ {0} ] in the deployment descriptors",
    new Object[] {ep.getName()}));                    
                return result;
            }           
        }
        // success
        result.addGoodDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}))
  result.passed(smh.getLocalString(getClass().getName() + ".passed",
           "There are no config properties with a duplicate name"));                    
        return result;
       
    }
View Full Code Here

     * @return result object containing the result of the individual test
     * performed
     */
    public Result check(ConnectorDescriptor descriptor) {
               
        Result result = getInitializedResult();
        ComponentNameConstructor compName =
          getVerifierContext().getComponentNameConstructor();
        if(!descriptor.getOutBoundDefined())
        {
          result.addNaDetails(smh.getLocalString
              ("tests.componentNameConstructor",
               "For [ {0} ]",
               new Object[] {compName.toString()}));
          result.notApplicable(smh.getLocalString
              ("com.sun.enterprise.tools.verifier.tests.connector.managed.notApplicableForInboundRA",
               "Resource Adapter does not provide outbound communication"));
          return result;
        }
         
View Full Code Here

   * @return result object containing the result of the individual test
   * performed
   */
  public Result check(ConnectorDescriptor descriptor) {

    Result result = getInitializedResult();
    ComponentNameConstructor compName =
      getVerifierContext().getComponentNameConstructor();
    if(!descriptor.getInBoundDefined())
    {
      result.addNaDetails(smh.getLocalString
          ("tests.componentNameConstructor",
           "For [ {0} ]",
           new Object[] {compName.toString()}));
      result.notApplicable(smh.getLocalString
          ("com.sun.enterprise.tools.verifier.tests.connector.messageinflow.notApp",
           "Resource Adapter does not provide inbound communication"));
      return result;
    }
    InboundResourceAdapter ra = descriptor.getInboundResourceAdapter();
    Set msgListeners = ra.getMessageListeners();
    boolean oneFailed = false;
    Iterator iter = msgListeners.iterator();
    while(iter.hasNext())
    {
      MessageListener msgListener = (MessageListener) iter.next();
      String impl = msgListener.getActivationSpecClass();
      Class implClass = null;
      try
      {
        implClass = Class.forName(impl, false, getVerifierContext().getClassLoader());
      }
      catch(ClassNotFoundException e)
      {
        result.addErrorDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}));
        result.failed(smh.getLocalString
            ("com.sun.enterprise.tools.verifier.tests.connector.messageinflow.nonexist",
             "Error: The class [ {0} ] as defined under activationspec-class in the deployment descriptor does not exist",
             new Object[] {impl}));
        return result;
      }
      try
      {
        Method equalsMethod = implClass.getMethod("equals",
            new Class[] {implClass});
        oneFailed = true;
        result.addErrorDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}));
        result.failed(smh.getLocalString(getClass().getName() + ".failed",
              "Error: activationspec-class [ {0} ] overrides the equals method",
              new Object[] {impl}));
        return result;               
      }
      catch(NoSuchMethodException e)
      {
        // implClass does not override equals.
      }
      catch(SecurityException e)
      {
      }
    }
    if(!oneFailed)
    {
      result.addGoodDetails(smh.getLocalString
          ("tests.componentNameConstructor",
           "For [ {0} ]",
           new Object[] {compName.toString()}))
      result.passed(smh.getLocalString(getClass().getName() + ".passed",
            "Success: all activationspec-class do not override the equals method"));
    }
    return result;
  }
View Full Code Here

     * @return result object containing the result of the individual test
     * performed
     */
    public Result check(ConnectorDescriptor descriptor) {
               
        Result result = getInitializedResult();
        ComponentNameConstructor compName =
          getVerifierContext().getComponentNameConstructor();
        // test NA for inboundRA
        if(!descriptor.getOutBoundDefined())
        {
          result.addNaDetails(smh.getLocalString
              ("tests.componentNameConstructor",
               "For [ {0} ]",
               new Object[] {compName.toString()}));
          result.notApplicable(smh.getLocalString
              ("com.sun.enterprise.tools.verifier.tests.connector.managed.notApplicableForInboundRA",
               "Resource Adapter does not provide outbound communication"));
          return result;
        }
        //File jarFile = Verifier.getJarFile(descriptor.getModuleDescriptor().getArchiveUri());
View Full Code Here

   * @return result object containing the result of the individual test
   * performed
   */
  public Result check(ConnectorDescriptor descriptor) {

    Result result = getInitializedResult();
    ComponentNameConstructor compName =
      getVerifierContext().getComponentNameConstructor();
    if(!descriptor.getInBoundDefined())
    {
      result.addNaDetails(smh.getLocalString
          ("tests.componentNameConstructor",
           "For [ {0} ]",
           new Object[] {compName.toString()}));
      result.notApplicable(smh.getLocalString
          ("com.sun.enterprise.tools.verifier.tests.connector.messageinflow.notApp",
           "Resource Adapter does not provide inbound communication"));
      return result;
    }
    InboundResourceAdapter ra = descriptor.getInboundResourceAdapter();
    Set msgListeners = ra.getMessageListeners();
    boolean oneFailed = false;
    Iterator iter = msgListeners.iterator();
    while(iter.hasNext())
    {
      MessageListener msgListener = (MessageListener) iter.next();
      String impl = msgListener.getActivationSpecClass();
      Class implClass = null;
      try
      {
        implClass = Class.forName(impl, false, getVerifierContext().getClassLoader());
      }
      catch(ClassNotFoundException e)
      {
        result.addErrorDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}));
        result.failed(smh.getLocalString
            ("com.sun.enterprise.tools.verifier.tests.connector.messageinflow.nonexist",
             "Error: The class [ {0} ] as defined under activationspec-class in the deployment descriptor does not exist",
             new Object[] {impl}));
        return result;
      }
      if(!isImplementorOf(implClass, "javax.resource.spi.ActivationSpec"))
      {
        oneFailed = true;
        result.addErrorDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}));
        result.failed(smh.getLocalString(getClass().getName() + ".failed",
              "Error: activationspec-class [ {0} ] does not implement javax.resource.spi.ActivationSpec.",
              new Object[] {impl}));
        return result;               
      }
    }
    if(!oneFailed)
    {
      result.addGoodDetails(smh.getLocalString
          ("tests.componentNameConstructor",
           "For [ {0} ]",
           new Object[] {compName.toString()}))
      result.passed(smh.getLocalString(getClass().getName() + ".passed",
            "Success: all activationspec-class implement javax.resource.spi.ActivationSpec"));
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.tools.verifier.Result

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.