Package oracle.toplink.essentials.ejb.cmp3.persistence

Examples of oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor


        // Turn off enhancement during verification. For details,
        // refer to http://glassfish.dev.java.net/issues/show_bug.cgi?id=3295
        props.put(TopLinkProperties.WEAVING, "FALSE");

        provider = new EntityManagerFactoryProvider();
        EntityManagerFactory emf = null;
        try {
            emf = provider.createContainerEntityManagerFactory(pi, props);
            logger.logp(Level.FINE, "DefaultProviderVerification", "check",
                    "emf = {0}", emf);
View Full Code Here


        if(classTransformers!=null) {
            return ;
        } else{
            classTransformers = new ArrayList<ClassTransformer>();
        }
        Archive archive =null;
        try{
           archive = (new ArchiveFactoryImpl()).createArchive(inputArchiveURL);
        }catch(ZipException e){
            throw StaticWeaveException.exceptionOpeningArchive(inputArchiveURL,e);
        }
View Full Code Here

        } else{
            classTransformer = new StaticWeaveClassTransformer(source, this.classLoader,this.logWriter,this.logLevel);
        }

        //Starting process...
        Archive sourceArchive =(new ArchiveFactoryImpl()).createArchive(source);
        Iterator entries = sourceArchive.getEntries();
        while (entries.hasNext()){
            String entryName = (String)entries.next();
            InputStream entryInputStream = sourceArchive.getEntry(entryName);
            String className = PersistenceUnitProcessor.buildClassNameFromEntryString(entryName) ;
           
            //Add a directory entry
            swoh.addDirEntry(getDirectoryFromEntryName(entryName));
           
View Full Code Here

        for(URL rootURL : rootUrls) {
            logMessage("Searching for default mapping file in " + rootURL); // NOI18N
            URL ormURL = null;
            InputStream stream = null;
            try {
                Archive m_par = null;
                m_par = new ArchiveFactoryImpl().createArchive(rootURL);
                ormURL = m_par.getEntryAsURL(ormXMLFile);
                stream = m_par.getEntry(ormXMLFile);
            } catch (IOException e) {
                throw new RuntimeException(e);
            } catch (URISyntaxException e) {
                throw new RuntimeException(e);
            }
View Full Code Here

        } else{
            classTransformers = new ArrayList<ClassTransformer>();
        }
        Archive archive =null;
        try{
           archive = (new ArchiveFactoryImpl()).createArchive(inputArchiveURL);
        }catch(ZipException e){
            throw StaticWeaveException.exceptionOpeningArchive(inputArchiveURL,e);
        }
           
        List<SEPersistenceUnitInfo> persistenceUnitsList =
View Full Code Here

        } else{
            classTransformer = new StaticWeaveClassTransformer(source, this.classLoader,this.logWriter,this.logLevel);
        }

        //Starting process...
        Archive sourceArchive =(new ArchiveFactoryImpl()).createArchive(source);
        Iterator entries = sourceArchive.getEntries();
        while (entries.hasNext()){
            String entryName = (String)entries.next();
            InputStream entryInputStream = sourceArchive.getEntry(entryName);
            String className = PersistenceUnitProcessor.buildClassNameFromEntryString(entryName) ;
View Full Code Here

            logMessage("Searching for default mapping file in " + rootURL); // NOI18N
            URL ormURL = null;
            InputStream stream = null;
            try {
                Archive m_par = null;
                m_par = new ArchiveFactoryImpl().createArchive(rootURL);
                ormURL = m_par.getEntryAsURL(ormXMLFile);
                stream = m_par.getEntry(ormXMLFile);
            } catch (IOException e) {
                throw new RuntimeException(e);
            } catch (URISyntaxException e) {
View Full Code Here

        if(persistenceUnitsList==null){
            throw PersistenceUnitLoadingException.couldNotGetUnitInfoFromUrl(inputArchiveURL);
        }
        Iterator<SEPersistenceUnitInfo> persistenceUnitsIterator = persistenceUnitsList.iterator();
        while (persistenceUnitsIterator.hasNext()){
            SEPersistenceUnitInfo unitInfo = (SEPersistenceUnitInfo)persistenceUnitsIterator.next();
            unitInfo.setNewTempClassLoader(aclassloader);
            //build class transformer.
            ClassTransformer transformer = buildTransformer(unitInfo,this.logWriter,this.logLevel);
            classTransformers.add(transformer);
        }
    }
View Full Code Here

    }

    public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
        if (NAMESPACE_URI.equals(namespaceURI)) {
            if (ELEMENT_PERSISTENCE_UNIT.equals(localName)) {
                persistenceUnitInfo = new SEPersistenceUnitInfo();
                persistenceUnitInfo.setPersistenceUnitName(atts.getValue(ATTRIBUTE_NAME));
                String transactionType = atts.getValue(ATTRIBUTE_TRANSACTION_TYPE);
                if(transactionType != null) {
                    persistenceUnitInfo.setTransactionType(PersistenceUnitTransactionType.valueOf(transactionType));
                }
View Full Code Here

        // synchronized to prevent overriding of the class loader
        // and also calls to predeploy and undeploy by other threads -
        // the latter may alter result of shouldRedeploy method.
        synchronized(emSetupImpl) {
            if(emSetupImpl.shouldRedeploy()) {
                SEPersistenceUnitInfo persistenceInfo = (SEPersistenceUnitInfo)emSetupImpl.getPersistenceUnitInfo();
                persistenceInfo.setClassLoader(JavaSECMPInitializer.getMainLoader());
                // if we are in undeployed state, this is a redeploy of an initial deployment that worked
                // so if weaving were going to occur, it already occured.  Therefore we can use the main classloader
                if (emSetupImpl.isUndeployed()){
                    persistenceInfo.setNewTempClassLoader(JavaSECMPInitializer.getMainLoader());
                }
            }
            // call predeploy
            // this will just increment the factory count since we should already be deployed
            emSetupImpl.predeploy(emSetupImpl.getPersistenceUnitInfo(), nonNullProperties);
View Full Code Here

TOP

Related Classes of oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor

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.