Package org.glassfish.ejb.deployment.descriptor

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


                    }
   
                    if ( desc instanceof IASEjbCMPEntityDescriptor) {
   
                        // generate concrete CMP class implementation
                        IASEjbCMPEntityDescriptor entd =
                                (IASEjbCMPEntityDescriptor)desc;
   
                        if (_logger.isLoggable(Logger.FINE)) {
                            _logger.fine(
                                    "[CMPC] Home Object Impl name  is " //NOI18N
                                    + entd.getLocalHomeImplClassName());
                        }
   
                        // The classloader needs to be set else we fail down the road.
                        ClassLoader ocl = entd.getClassLoader();
                        entd.setClassLoader(jcl);
                   
                        try {
                            gen.generate(entd, stubsDir, stubsDir);
                        } catch (GeneratorException e) {
                            String msg = e.getMessage();
                            _logger.warning(msg);
                            generatorExceptionMsg = addGeneratorExceptionMessage(
                                    msg, generatorExceptionMsg);
                        finally {
                            entd.setClassLoader(ocl);
                        }

                    /* WARNING: IASRI 4683195
                     * JDO Code failed when there was a relationship involved
                     * because it depends upon the orginal ejbclasname and hence
View Full Code Here


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

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

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

        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

Related Classes of org.glassfish.ejb.deployment.descriptor.IASEjbCMPEntityDescriptor

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.