Package javax.persistence.spi

Examples of javax.persistence.spi.ClassTransformer


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


    public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map properties){
            Map nonNullProperties = (properties == null) ? new HashMap() : properties;
       
        EntityManagerSetupImpl emSetupImpl = null;
            boolean isNew = false;
            ClassTransformer transformer = null;
        synchronized (EntityManagerFactoryProvider.emSetupImpls) {
            String puName = PersistenceUnitProcessor.buildPersistenceUnitName(info.getPersistenceUnitRootUrl(), info.getPersistenceUnitName());
           
            emSetupImpl = EntityManagerFactoryProvider.getEntityManagerSetupImpl(puName);
            if (emSetupImpl == null){
View Full Code Here

                    sessionName = puName;
                }
                EntityManagerSetupImpl emSetupImpl = new EntityManagerSetupImpl(puName, sessionName);
                //indicates that predeploy is used for static weaving, also passes logging parameters
                emSetupImpl.setStaticWeaveInfo(this.info);
                ClassTransformer transformer = emSetupImpl.predeploy(unitInfo, emptyMap);
                if (transformer != null) {
                    classTransformers.add(transformer);
                }
            }
        } catch (ZipException e) {
View Full Code Here

        persistenceUnitInfo.setClassLoader(persistenceHelper.getClassLoader(persistenceUnitInfo.getPersistenceUnitName(), m));

        EntityManagerSetupImpl emSetupImpl = new EntityManagerSetupImpl(persistenceUnitUniqueName, sessionName);

        // A call to predeploy will partially build the session we will use
        final ClassTransformer transformer = emSetupImpl.predeploy(persistenceUnitInfo, mergedProperties);

        // After preDeploy it's impossible to weave again - so may substitute the temporary classloader with the real one.
        // The temporary classloader could be garbage collected even if the puInfo is cached for the future use by other emSetupImpls.
        persistenceUnitInfo.setNewTempClassLoader(persistenceUnitInfo.getClassLoader());
       
View Full Code Here

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

    public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map properties){
            Map nonNullProperties = (properties == null) ? new HashMap() : properties;
       
        EntityManagerSetupImpl emSetupImpl = null;
        boolean isNew = false;
        ClassTransformer transformer = null;
        String puName = PersistenceUnitProcessor.buildPersistenceUnitName(info.getPersistenceUnitRootUrl(), info.getPersistenceUnitName());
        String esiName = puName;
        if (nonNullProperties.get(PersistenceUnitProperties.SESSION_NAME) != null) {
            esiName = puName + nonNullProperties.get(PersistenceUnitProperties.SESSION_NAME);
        } else {
View Full Code Here

            }
           
            boolean throwExceptionOnFail = "true".equalsIgnoreCase(
                    EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.THROW_EXCEPTIONS, predeployProperties, "true", session));               
   
            ClassTransformer transformer = null;
           
            boolean weaveChangeTracking = false;
            boolean weaveLazy = false;
            boolean weaveEager = false;
            boolean weaveFetchGroups = false;
View Full Code Here

                ++ EntityManagerFactoryProvider.PUIUsageCount;
            }
          
   
            // A call to predeploy will partially build the session we will use
            final ClassTransformer transformer = emSetupImpl.predeploy(persistenceUnitInfo, mergedProperties);
   
            registerTransformer(transformer, persistenceUnitInfo);
            return true;
        }
        return false;
View Full Code Here

                    sessionName = puName;
                }
                EntityManagerSetupImpl emSetupImpl = new EntityManagerSetupImpl(puName, sessionName);
                //indicates that predeploy is used for static weaving, also passes logging parameters
                emSetupImpl.setStaticWeaveInfo(this.info);
                ClassTransformer transformer = emSetupImpl.predeploy(unitInfo, emptyMap);
                if (transformer != null) {
                    classTransformers.add(transformer);
                }
            }
        } catch (ZipException e) {
View Full Code Here

        persistenceUnitInfo.setNewTempClassLoader(tempLoader);

        EntityManagerSetupImpl emSetupImpl = new EntityManagerSetupImpl(persistenceUnitUniqueName, sessionName);

        // A call to predeploy will partially build the session we will use
        final ClassTransformer transformer = emSetupImpl.predeploy(persistenceUnitInfo, mergedProperties);

        // After preDeploy it's impossible to weave again - so may substitute the temporary classloader with the real one.
        // The temporary classloader could be garbage collected even if the puInfo is cached for the future use by other emSetupImpls.
        persistenceUnitInfo.setNewTempClassLoader(persistenceUnitInfo.getClassLoader());
       
View Full Code Here

TOP

Related Classes of javax.persistence.spi.ClassTransformer

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.