Package com.sun.enterprise.tools.verifier.tests

Examples of com.sun.enterprise.tools.verifier.tests.ComponentNameConstructor


     * @return <code>Result</code> the results for this assertion
     */
    public Result check(EjbDescriptor descriptor) {

  Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();

  if ((descriptor instanceof EjbSessionDescriptor||
      (descriptor instanceof EjbEntityDescriptor)) {
      boolean oneFailed = false;
      int foundAtLeastOne = 0;
View Full Code Here


     * @return <code>Result</code> the results for this assertion
     */
    public Result check(EjbDescriptor descriptor) {

  Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();

  if ((descriptor instanceof EjbSessionDescriptor||
      (descriptor instanceof EjbEntityDescriptor)) {
      boolean oneFailed = false;
      int foundAtLeastOne = 0;
      try {
    if(descriptor.getHomeClassName() == null || "".equals(descriptor.getHomeClassName())) {
        result.addNaDetails(smh.getLocalString
          ("tests.componentNameConstructor",
           "For [ {0} ]",
           new Object[] {compName.toString()}));
        result.notApplicable(smh.getLocalString
           (getClass().getName() + ".notApplicable1",
            " [ {0} ] does not have a remote home interface. ",
            new Object[] {descriptor.getEjbClassName()}));
        return result;
View Full Code Here

     * @return <code>Result</code> the results for this assertion
     */
    public Result check(EjbDescriptor descriptor) {
       
        Result result = getInitializedResult();
        ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
       
        if(descriptor.getHomeClassName() == null || "".equals(descriptor.getHomeClassName())){
            addNaDetails(result, compName);
            result.notApplicable(smh.getLocalString
                    ("com.sun.enterprise.tools.verifier.tests.ejb.localinterfaceonly.notapp",
View Full Code Here

     */

    protected void runIndividualHomeMethodTest(Method method, EjbDescriptor descriptor, Result result) {
       
        Method m;
  ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();

  try {   
      // retrieve the remote interface methods
      ClassLoader jcl = getVerifierContext().getClassLoader();
      Class ejbClass = Class.forName(descriptor.getEjbClassName(), false, jcl);
View Full Code Here

     * @param method the method to run the test on
     */
  protected void runIndividualHomeMethodTest( Method method,EjbDescriptor descriptor, Result result) {
     
      Class[] methodExceptionTypes = method.getExceptionTypes();
      ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
     
      // The methods arguments types must be legal types for
      // RMI-IIOP.  This means that their exception values must
      // throw java.rmi.RemoteException
      // methods must also throw java.rmi.RemoteException
View Full Code Here

 
    public Result check(EjbDescriptor descriptor) {

  Result result = getInitializedResult();
  ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
  String str = null;

  if(getHomeInterfaceName(descriptor) == null || "".equals(getHomeInterfaceName(descriptor))){
            result.addNaDetails(smh.getLocalString
                        ("tests.componentNameConstructor", "For [ {0} ]",
                         new Object[] {compName.toString()}));
            result.notApplicable(smh.getLocalString
                       ("com.sun.enterprise.tools.verifier.tests.ejb.localinterfaceonly.notapp",
                        "Not Applicable because, EJB [ {0} ] has Local Interfaces only.",
                                          new Object[] {descriptor.getEjbClassName()}));

      return result;
  }

  if ((descriptor instanceof EjbSessionDescriptor) ||
      (descriptor instanceof EjbEntityDescriptor)) {
      try {
    Context context = getVerifierContext();
    ClassLoader jcl = context.getClassLoader();
    Class c = Class.forName(getClassName(descriptor), false, jcl);
    str = getSuperInterface();
                if (isImplementorOf(c, str)) {
        // it extends the proper EJBHome
        result.addGoodDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}))
        result.passed(smh.getLocalString
          (getClass().getName() + ".passed",
           "[ {0} ] properly extends the " + str + "interface.",
           new Object[] {getClassName(descriptor)}));
                } else {
        result.addErrorDetails(smh.getLocalString
             ("tests.componentNameConstructor",
              "For [ {0} ]",
              new Object[] {compName.toString()}));
        result.failed(smh.getLocalString
          (getClass().getName() + ".failed",
           "Error: [ {0} ] does not properly extend the  " + str +
           " interface.  All enterprise beans home interfaces must extend the  " + str +
           " interface.  [ {1} ] is not a valid home interface.",
           new Object[] {getClassName(descriptor),getClassName(descriptor)}));
    }
      } catch (ClassNotFoundException e) {
    Verifier.debug(e);
    result.addErrorDetails(smh.getLocalString
               ("tests.componentNameConstructor",
          "For [ {0} ]",
          new Object[] {compName.toString()}));
    result.failed(smh.getLocalString
            (getClass().getName() + ".failedException",
             "Error: [ {0} ] class not found.",
             new Object[] {getClassName(descriptor)}));
     
      return result;
  } else {
      result.addNaDetails(smh.getLocalString
        ("tests.componentNameConstructor",
         "For [ {0} ]",
         new Object[] {compName.toString()}));
      result.notApplicable(smh.getLocalString
         (getClass().getName() + ".notApplicable",
          "[ {0} ] expected {1} bean or {2} bean, but called with {3}.",
          new Object[] {getClass(),"Session","Entity",descriptor.getName()}));
      return result;
View Full Code Here

     * @return <code>Result</code> the results for this assertion
     */
    public Result check(EjbDescriptor descriptor) {

  Result result = getInitializedResult();
  ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
 
  if(descriptor.getHomeClassName() == null || "".equals(descriptor.getHomeClassName())) {
            addNaDetails(result, compName);
            result.notApplicable(smh.getLocalString
                       ("com.sun.enterprise.tools.verifier.tests.ejb.localinterfaceonly.notapp",
View Full Code Here

   
    public Result check(EjbDescriptor descriptor)
    {

  Result result = getInitializedResult();
  ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();     
        String beanCache = null;
        String maxCacheSize = null;       
        try
        {
            beanCache = getXPathValue("/sun-ejb-jar/enterprise-beans/ejb[ejb-name=\""+descriptor.getName()+"\"]/bean-cache");
View Full Code Here

     */
   
    protected boolean runIndividualMethodTest(EjbDescriptor descriptor, Method method, Result result) {      
       
        boolean businessMethodFound, exceptionsMatch;
        ComponentNameConstructor compName = null;
       
        try {   
            compName = getVerifierContext().getComponentNameConstructor();
            // retrieve the EJB Class Methods
            ClassLoader jcl = getVerifierContext().getClassLoader();           
View Full Code Here

     * @return <code>Result</code> the results for this assertion
     */
    public Result check(EjbDescriptor descriptor) {

        Result result = getInitializedResult();
        ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();

        if (!descriptor.getEnvironmentProperties().isEmpty()) {
            // environment entry value type must be one of the following Java types:
            // String, Integer, Boolean, Double, Byte, Short, Long, and Float.
            for (Iterator itr = descriptor.getEnvironmentProperties().iterator();
View Full Code Here

TOP

Related Classes of com.sun.enterprise.tools.verifier.tests.ComponentNameConstructor

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.