Package com.sun.enterprise.tools.common.dd.ejb

Examples of com.sun.enterprise.tools.common.dd.ejb.Ejb


        EnterpriseBeans eBeans = sunEjbJar.getEnterpriseBeans();
        Ejb[] ejbs = eBeans.getEjb();
        HashMap wsMap = new HashMap();

        for (int ejbCnt =0; ejbCnt < ejbs.length; ejbCnt++) {
            Ejb ejb = ejbs[ejbCnt];

            // all web service endpoints for this ejb
            WebserviceEndpoint[] webSvcEps = ejb.getWebserviceEndpoint();

            for ( int wsCnt = 0; wsCnt < webSvcEps.length; wsCnt++) {
                WebserviceEndpoint webSvc = webSvcEps[wsCnt];

                boolean isSec = false;
View Full Code Here


  Result result = getInitializedResult();
  ComponentNameConstructor compName = new ComponentNameConstructor(descriptor);

        SunEjbJar ejbJar = descriptor.getEjbBundleDescriptor().getIasEjbObject();
        String ejbName = null;
        Ejb testCase = null;
        if(ejbJar!=null)
        {
            testCase = getEjb(descriptor.getName(),ejbJar);
            String isReadOnlyBean = testCase.getIsReadOnlyBean();
            if(isReadOnlyBean != null)
            {
                if(isReadOnlyBean.length()==0)
                {
                    oneFailed = true;
View Full Code Here

        boolean oneWarning = false;
        boolean oneFailed = false;
       
        if(ejbJar!=null)
        {
            Ejb testCase = getEjb(descriptor.getName(), ejbJar);
            String refreshPeriod = testCase.getRefreshPeriodInSeconds();
           
            boolean isReadOnly = false;
            String beanType = testCase.getIsReadOnlyBean();
            if(beanType!=null && beanType.equals("true"))
                isReadOnly = true;
            else
                isReadOnly=false;
           
View Full Code Here

        SunEjbJar ejbJar = descriptor.getEjbBundleDescriptor().getIasEjbObject();
        boolean oneFailed = false;
       
        if(ejbJar!=null)
        {
            Ejb ejbs[] = ejbJar.getEnterpriseBeans().getEjb();
            Ejb testCase = null;
            for(int i=0;i<ejbs.length;i++)
            {
                if(ejbs[i].getEjbName().equals(descriptor.getName()))
                {
                    testCase = ejbs[i];
                    break;
                }
            }
           
            ResourceRef resRefs[] = testCase.getResourceRef();
            ResourceReferenceDescriptor resDesc;
            if(resRefs.length > 0)
            {
                for(int i=0;i<resRefs.length;i++)
                {
View Full Code Here

        boolean oneFailed = false;
        boolean oneWarning = false;
       
        if(ejbJar!=null)
        {
            Ejb ejbs[] = ejbJar.getEnterpriseBeans().getEjb();
            Ejb testCase = null;
            for(int i=0;i<ejbs.length;i++)
            {
                if(ejbs[i].getEjbName().equals(descriptor.getName()))
                {
                    testCase = ejbs[i];
                    break;
                }
            }
           
            ResourceRef resRefs[] = testCase.getResourceRef();
            ResourceReferenceDescriptor resDesc;
            if(resRefs.length > 0)
            {
                for(int i=0;i<resRefs.length;i++)
                {
View Full Code Here

        SunEjbJar ejbJar = descriptor.getEjbBundleDescriptor().getIasEjbObject();
        boolean oneFailed = false;
       
        if(ejbJar!=null)
        {
            Ejb ejbs[] = ejbJar.getEnterpriseBeans().getEjb();
            Ejb testCase = null;
            for(int i=0;i<ejbs.length;i++)
            {
                if(ejbs[i].getEjbName().equals(descriptor.getName()))
                {
                    testCase = ejbs[i];
                    break;
                }
            }
           
            ResourceRef resRefs[] = testCase.getResourceRef();
            if(resRefs.length > 0)
            {
                for(int j=0;j<resRefs.length;j++)
                {
                    String refName = resRefs[j].getResRefName();
View Full Code Here

        SunEjbJar ejbJar = descriptor.getEjbBundleDescriptor().getIasEjbObject();
        boolean oneFailed = false;
       
        if(ejbJar!=null)
        {
            Ejb testCase = getEjb(descriptor.getName(),ejbJar);
            String commitOption = testCase.getCommitOption();
            if(commitOption!=null)
            {
                if(commitOption.length()==0)
                {
                    result.failed(smh.getLocalString(getClass().getName()+".failed",
View Full Code Here

        SunEjbJar ejbJar = descriptor.getEjbBundleDescriptor().getIasEjbObject();
        boolean oneFailed = false;
       
        if(ejbJar!=null)
        {
            Ejb testCase = getEjb(descriptor.getName(),ejbJar);           
            ResourceRef resRefs[] = testCase.getResourceRef();
            if(resRefs.length > 0)
            {
                for(int j=0;j<resRefs.length;j++)
                {
                    String refName = resRefs[j].getResRefName();
View Full Code Here

    {
        Result result = getInitializedResult();
        ComponentNameConstructor compName = new ComponentNameConstructor(descriptor);

        SunEjbJar ejbJar = descriptor.getEjbBundleDescriptor().getIasEjbObject();
        Ejb testCase = null;
        if(ejbJar!=null)
        {
            testCase = super.getEjb(descriptor.getName(),ejbJar);
            Cmp cmpBean = testCase.getCmp();
            if(cmpBean != null)
            {
                //mapping-properties
                String mappingProps = cmpBean.getMappingProperties();
                if(mappingProps == null)
                {
            oneWarning = true;
                    result.warning(smh.getLocalString(getClass().getName()+".warning",
                        "WARNING [AS-EJB cmp] : mapping-properties Element is not defined"));
                }
                else
                {
                    if(mappingProps.length()==0)
                    {
                        oneFailed = true;
                        result.failed(smh.getLocalString(getClass().getName()+".failed",
                            "FAILED [AS-EJB cmp] : mapping-properties field must contain a vaild non-empty value"));
                    }
                    else//4690436
                    {   File f = Verifier.getJarFile(((EjbBundleArchivist) descriptor.getEjbBundleDescriptor().getArchivist()).getEjbJarFile().getName());
                        JarFile jarFile = null;
                        ZipEntry deploymentEntry=null;
                        try {
                              jarFile = new JarFile(f);
                              if(jarFile!=null)
                              deploymentEntry = jarFile.getEntry(mappingProps);
                             

                        }
                        catch(IOException e){}
                        finally{
                           tryif(jarFile!=null) jarFile.close();}
                           catch(IOException e){}
                        }

                        if(deploymentEntry !=null){
                        result.passed(smh.getLocalString(getClass().getName()+".passed",
                            "PASSED [AS-EJB cmp] : mapping-properties file is {0}",
                            new Object[]{mappingProps}));
                        }
                        else{
                        //invalid entry
                        result.failed(smh.getLocalString(getClass().getName()+".failed",
                            "FAILED [AS-EJB cmp] : mapping-properties field must contain a vaild non-empty value"));


                        }
                    }
                }

                //is-one-one-cmp
                String isOneOne = cmpBean.getIsOneOneCmp();
                if(isOneOne == null)
                {
          oneWarning = true;
                    result.warning(smh.getLocalString(getClass().getName()+".warning1",
                        "WARNING [AS-EJB cmp] : is-one-one-cmp Element is not defined"));
                }
                else
                {
                    if(isOneOne.length()==0)
                    {
                        oneFailed = true;
                        result.failed(smh.getLocalString(getClass().getName()+".failed1",
                            "FAILED [AS-EJB cmp] : is-one-one-cmp cannot be an empty string. It can be either true or false"));
                    }
                    else
                    {
                        if(!isOneOne.equals("true") && !isOneOne.equals("false"))
                        {
                            oneFailed = true;
                            result.failed(smh.getLocalString(getClass().getName()+".failed2",
                                "FAILED [AS-EJB cmp] : is-one-one-cmp cannot be {0}. It can either be true or false",
                                new Object[]{isOneOne}));
                        }
                        else
                        {
                            result.passed(smh.getLocalString(getClass().getName()+".passed1",
                                "PASSED [AS-EJB cmp] : is-one-one-cmp is {0}",
                                new Object[]{isOneOne}));
                        }
                    }
                }

                //one-one-finders
                OneOneFinders finders = cmpBean.getOneOneFinders();
                if(finders!=null)
                {
                    testFinders(finders,result);
                }
                else
                {
          oneWarning = true;
                    result.warning(smh.getLocalString(getClass().getName()+".warning2",
                        "WARNING [AS-EJB cmp] : one-one-finders Element is not defined"));
                }

                if(oneFailed)
                    result.setStatus(Result.FAILED);
        else if(oneWarning)
            result.setStatus(Result.WARNING);
            }
            else
                result.notApplicable(smh.getLocalString(getClass().getName()+".notApplicable",
                    "NOT APPLICABLE [AS-EJB cmp] : {0} is not a CMP Entity Bean.",
                    new Object[] {testCase.getEjbName()}));
        }
        else
        {
            result.failed(smh.getLocalString(getClass().getName()+".notRun",
                "NOT RUN [AS-EJB cmp] Could not create SunEjbJar Object."));
View Full Code Here

        SunEjbJar ejbJar = descriptor.getEjbBundleDescriptor().getIasEjbObject();
       
        if(ejbJar!=null)
        {
            Ejb ejbs[] = ejbJar.getEnterpriseBeans().getEjb();
            Ejb testCase = null;
            for(int i=0;i<ejbs.length;i++)
            {
                if(ejbs[i].getEjbName().equals(descriptor.getName()))
                {
                    testCase = ejbs[i];
                    break;
                }
            }
           
            IorSecurityConfig iorSec = testCase.getIorSecurityConfig();
            if(iorSec == null)
            {
                result.notApplicable(smh.getLocalString(getClass().getName()+".notApplicable",
                    "NOT APPLICABLE [AS-EJB ior-security-config] : ior-security-config Element not defined"));
            }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.tools.common.dd.ejb.Ejb

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.