Package org.glassfish.api.deployment

Examples of org.glassfish.api.deployment.InstrumentableClassLoader


        // otherwise, we return the final one.
        if (phase==Phase.PREPARE) {
            if (sharable) {
                return sharableTemp;
            } else {
                InstrumentableClassLoader cl = InstrumentableClassLoader.class.cast(sharableTemp);
                return cl.copy();
            }
        } else {
            // we are out of the prepare phase, destroy the shareableTemp and
            // return the final classloader
            if (sharableTemp!=null) {
View Full Code Here


        Result result = getInitializedResult();
        result.setStatus(Result.PASSED);
        PersistenceProvider provider;
        final String appLocation =
                getVerifierContext().getAbstractArchive().getURI().getPath();
        final InstrumentableClassLoader cl =
                InstrumentableClassLoader.class.cast(pu.getParent().getClassLoader());
        PersistenceUnitInfo pi = new AVKPersistenceUnitInfoImpl(pu, appLocation, cl);
        logger.fine("PersistenceInfo for PU is :\n" + pi);
        Properties props = new Properties();
        // This property is set to indicate that TopLink should only
View Full Code Here

        // otherwise, we return the final one.
        if (phase==Phase.PREPARE) {
            if (sharable) {
                return sharableTemp;
            } else {
                InstrumentableClassLoader cl = InstrumentableClassLoader.class.cast(sharableTemp);
                return cl.copy();
            }
        } else {
            // we are out of the prepare phase, destroy the shareableTemp and
            // return the final classloader
            if (sharableTemp!=null) {
View Full Code Here

     * registration of a ClassFileTransformer. In such case, the deployer should either fail
     * deployment or revert to a mode without the byteocode enhancement feature.
     */
    public void addTransformer(ClassFileTransformer transformer) {

        InstrumentableClassLoader icl = InstrumentableClassLoader.class.cast(getFinalClassLoader());
        String isComposite = getAppProps().getProperty(ServerTags.IS_COMPOSITE);

        if (Boolean.valueOf(isComposite) && icl instanceof URLClassLoader) {
            URLClassLoader urlCl = (URLClassLoader)icl;
            boolean isAppLevel = (getParentContext() == null);
            if (isAppLevel) {
                // for ear lib PUs, let's install the
                // tranformers with the EarLibClassLoader
                icl = InstrumentableClassLoader.class.cast(urlCl.getParent().getParent());
            } else {
                // for modules inside the ear, let's install the
                // transformers with the EarLibClassLoader in
                // addition to installing them to module classloader
                ClassLoader libCl = urlCl.getParent().getParent();
                if (!(libCl instanceof URLClassLoader)) {
                    // web module
                    libCl = libCl.getParent();
                }
                if (libCl instanceof URLClassLoader) {
                    InstrumentableClassLoader libIcl = InstrumentableClassLoader.class.cast(libCl);
                    libIcl.addTransformer(transformer);
                }

            }
        }
        icl.addTransformer(transformer);
View Full Code Here

        // otherwise, we return the final one.
        if (phase==Phase.PREPARE) {
            if (sharable) {
                return sharableTemp;
            } else {
                InstrumentableClassLoader cl = InstrumentableClassLoader.class.cast(sharableTemp);
                return cl.copy();
            }
        } else {
            // we are out of the prepare phase, destroy the shareableTemp and
            // return the final classloader
            if (sharableTemp!=null) {
View Full Code Here

     * registration of a ClassFileTransformer. In such case, the deployer should either fail
     * deployment or revert to a mode without the byteocode enhancement feature.
     */
    public void addTransformer(ClassFileTransformer transformer) {

        InstrumentableClassLoader icl = InstrumentableClassLoader.class.cast(getFinalClassLoader());
        String isComposite = getAppProps().getProperty(ServerTags.IS_COMPOSITE);

        if (Boolean.valueOf(isComposite) && icl instanceof URLClassLoader) {
            URLClassLoader urlCl = (URLClassLoader)icl;
            boolean isAppLevel = (getParentContext() == null);
            if (isAppLevel) {
                // for ear lib PUs, let's install the
                // tranformers with the EarLibClassLoader
                icl = InstrumentableClassLoader.class.cast(urlCl.getParent().getParent());
            } else {
                // for modules inside the ear, let's install the
                // transformers with the EarLibClassLoader in
                // addition to installing them to module classloader
                ClassLoader libCl = urlCl.getParent().getParent();
                if (!(libCl instanceof URLClassLoader)) {
                    // web module
                    libCl = libCl.getParent();
                }
                if (libCl instanceof URLClassLoader) {
                    InstrumentableClassLoader libIcl = InstrumentableClassLoader.class.cast(libCl);
                    libIcl.addTransformer(transformer);
                }

            }
        }
        icl.addTransformer(transformer);
View Full Code Here

        // otherwise, we return the final one.
        if (phase==Phase.PREPARE) {
            if (sharable) {
                return sharableTemp;
            } else {
                InstrumentableClassLoader cl = InstrumentableClassLoader.class.cast(sharableTemp);
                return cl.copy();
            }
        } else {
            // we are out of the prepare phase, destroy the shareableTemp and
            // return the final classloader
            if (sharableTemp!=null) {
View Full Code Here

     * registration of a ClassFileTransformer. In such case, the deployer should either fail
     * deployment or revert to a mode without the byteocode enhancement feature.
     */
    public void addTransformer(ClassFileTransformer transformer) {

        InstrumentableClassLoader icl = InstrumentableClassLoader.class.cast(getFinalClassLoader());
        String isComposite = getAppProps().getProperty(ServerTags.IS_COMPOSITE);

        if (Boolean.valueOf(isComposite) && icl instanceof URLClassLoader) {
            URLClassLoader urlCl = (URLClassLoader)icl;
            boolean isAppLevel = (getParentContext() == null);
            if (isAppLevel) {
                // for ear lib PUs, let's install the
                // tranformers with the EarLibClassLoader
                icl = InstrumentableClassLoader.class.cast(urlCl.getParent().getParent());
            } else {
                // for modules inside the ear, let's install the
                // transformers with the EarLibClassLoader in
                // addition to installing them to module classloader
                ClassLoader libCl = urlCl.getParent().getParent();
                if (!(libCl instanceof URLClassLoader)) {
                    // web module
                    libCl = libCl.getParent();
                }
                if (libCl instanceof URLClassLoader) {
                    InstrumentableClassLoader libIcl = InstrumentableClassLoader.class.cast(libCl);
                    libIcl.addTransformer(transformer);
                }

            }
        }
        icl.addTransformer(transformer);
View Full Code Here

        // otherwise, we return the final one.
        if (phase==Phase.PREPARE) {
            if (sharable) {
                return sharableTemp;
            } else {
                InstrumentableClassLoader cl = InstrumentableClassLoader.class.cast(sharableTemp);
                return cl.copy();
            }
        } else {
            // we are out of the prepare phase, destroy the shareableTemp and
            // return the final classloader
            if (sharableTemp!=null) {
View Full Code Here

     * registration of a ClassFileTransformer. In such case, the deployer should either fail
     * deployment or revert to a mode without the byteocode enhancement feature.
     */
    public void addTransformer(ClassFileTransformer transformer) {

        InstrumentableClassLoader icl = InstrumentableClassLoader.class.cast(getFinalClassLoader());
        String isComposite = getAppProps().getProperty(ServerTags.IS_COMPOSITE);

        if (Boolean.valueOf(isComposite) && icl instanceof URLClassLoader) {
            URLClassLoader urlCl = (URLClassLoader)icl;
            boolean isAppLevel = (getParentContext() == null);
            if (isAppLevel) {
                // for ear lib PUs, let's install the
                // tranformers with the EarLibClassLoader
                icl = InstrumentableClassLoader.class.cast(urlCl.getParent().getParent());
            } else {
                // for modules inside the ear, let's install the
                // transformers with the EarLibClassLoader in
                // addition to installing them to module classloader
                ClassLoader libCl = urlCl.getParent().getParent();
                if (!(libCl instanceof URLClassLoader)) {
                    // web module
                    libCl = libCl.getParent();
                }
                if (libCl instanceof URLClassLoader) {
                    InstrumentableClassLoader libIcl = InstrumentableClassLoader.class.cast(libCl);
                    libIcl.addTransformer(transformer);
                }

            }
        }
        icl.addTransformer(transformer);
View Full Code Here

TOP

Related Classes of org.glassfish.api.deployment.InstrumentableClassLoader

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.