Examples of IASEjbCMPEntityDescriptor


Examples of org.glassfish.ejb.deployment.descriptor.IASEjbCMPEntityDescriptor

     * fields already parsed.
     */
    private EjbCMPEntityDescriptor getCMPEntityDescriptor() {
        EjbDescriptor current = getEjbDescriptor();
        if (!(current instanceof EjbCMPEntityDescriptor)) {
            descriptor = new IASEjbCMPEntityDescriptor(current);
        }
        return (EjbCMPEntityDescriptor) descriptor;
    }
View Full Code Here

Examples of org.glassfish.ejb.deployment.descriptor.IASEjbCMPEntityDescriptor

     * fields already parsed.
     */
    private EjbCMPEntityDescriptor getCMPEntityDescriptor() {
        EjbDescriptor current = getEjbDescriptor();
        if (!(current instanceof EjbCMPEntityDescriptor)) {
            descriptor = new IASEjbCMPEntityDescriptor(current);
        }
        return (EjbCMPEntityDescriptor) descriptor;
    }
View Full Code Here

Examples of org.glassfish.ejb.deployment.descriptor.IASEjbCMPEntityDescriptor

        Result result = getInitializedResult();
        ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
        try {
        if (descriptor instanceof IASEjbCMPEntityDescriptor){
           
            IASEjbCMPEntityDescriptor cmpBean = (IASEjbCMPEntityDescriptor)descriptor;

            String mappingProps = cmpBean.getMappingProperties();
            if(mappingProps == null){
                oneWarning = true;
                addWarningDetails(result, compName);
                result.warning(smh.getLocalString(getClass().getName()+".warning",
                    "WARNING [AS-EJB cmp] : mapping-properties Element is not defined"));
            }else{
                if(mappingProps.length()==0) {
                    oneFailed = true;
                    addErrorDetails(result, compName);
                    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.getArchiveFile(descriptor.getEjbBundleDescriptor().getModuleDescriptor().getArchiveUri());
                    JarFile jarFile = null;
                    ZipEntry deploymentEntry=null;
//                        try {
//                            jarFile = new JarFile(f);
                          if(jarFile!=null)
                              deploymentEntry = jarFile.getEntry(mappingProps);
//                        }catch(IOException e){}
//                        finally{
//                           try{  if(jarFile!=null) jarFile.close();}
//                           catch(IOException e){}
//                        }

                    if(deploymentEntry !=null){
                    addGoodDetails(result, compName);
                    result.passed(smh.getLocalString(getClass().getName()+".passed",
                        "PASSED [AS-EJB cmp] : mapping-properties file is {0}",
                        new Object[]{mappingProps}));
                    }else{
                        addErrorDetails(result, compName);
                        //invalid entry
                        result.failed(smh.getLocalString(getClass().getName()+".failed",
                            "FAILED [AS-EJB cmp] : mapping-properties field must contain a vaild non-empty value"));
                    }
                }
            }
           
            try{
                boolean oneoneCmp = cmpBean.getCMPVersion()== EjbCMPEntityDescriptor.CMP_1_1;
                addGoodDetails(result, compName);
                result.passed(smh.getLocalString(getClass().getName()+".passed1",
                    "PASSED [AS-EJB cmp] : is-one-one-cmp is {0}",
                    new Object[]{new Boolean(oneoneCmp)}));
            }catch(Exception ex){
                oneWarning = true;
                addWarningDetails(result, compName);
                result.warning(smh.getLocalString(getClass().getName()+".warning1",
                    "WARNING [AS-EJB cmp] : is-one-one-cmp Element is not defined"));
            }
           
            try{
//EXCEPTION is thrown here as getOneOneFinders() internally uses queryPArser which is null. Exception as:
//Apr 4, 2003 11:18:22 AM com.sun.enterprise.deployment.IASEjbCMPEntityDescriptor getOneOneFinder
                Map finders = cmpBean.getOneOneFinders();
                if(finders!=null){
                    testFinders(finders,result);
                }else{
                    oneWarning = true;
                    addWarningDetails(result, compName);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.