Examples of InstrumentableClassLoader


Examples of com.sun.enterprise.loader.InstrumentableClassLoader

    this(ClassUtils.getDefaultClassLoader());
  }

  public GlassFishLoadTimeWeaver(ClassLoader classLoader) {
    Assert.notNull(classLoader, "ClassLoader must not be null");
    InstrumentableClassLoader icl = determineClassLoader(classLoader);
    if (icl == null) {
      throw new IllegalArgumentException(classLoader + " and its parents are not suitable ClassLoaders: " +
          "An [" + InstrumentableClassLoader.class.getName() + "] implementation is required.");
    }
    this.classLoader = icl;
View Full Code Here

Examples of com.sun.enterprise.loader.InstrumentableClassLoader

        Result result = getInitializedResult();
        result.setStatus(Result.PASSED);
        PersistenceProvider provider;
        final String appLocation =
                getVerifierContext().getAbstractArchive().getArchiveUri();
        final InstrumentableClassLoader cl =
                InstrumentableClassLoader.class.cast(pu.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

Examples of com.sun.enterprise.loader.InstrumentableClassLoader

        // but won't execute DDLs themselves.
        // As part of the normal application load we would set this property to a
        // value of "NONE".
        overrides.put(providerPropertyNamesHolder.ddlGenerationMode, DDL_SQL_SCRIPT_GENERATION);

        final InstrumentableClassLoader cl =
                InstrumentableClassLoader.class.cast(
                    persistenceUnitDescriptor.getClassLoader());
        PersistenceUnitInfo pi = new Java2DBPersistenceUnitInfoImpl(
                persistenceUnitDescriptor,
                appDeployedLocation,
View Full Code Here

Examples of com.sun.enterprise.loader.InstrumentableClassLoader

   * @throws IllegalArgumentException if the supplied <code>classLoader</code> is <code>null</code>;
   * or if the supplied <code>classLoader</code> is not an {@link InstrumentableClassLoader}
   */
  public GlassFishLoadTimeWeaver(ClassLoader classLoader) {
    Assert.notNull(classLoader, "ClassLoader must not be null");
    InstrumentableClassLoader icl = determineClassLoader(classLoader);
    if (icl == null) {
      throw new IllegalArgumentException(classLoader + " and its parents are not suitable ClassLoaders: " +
          "An [" + InstrumentableClassLoader.class.getName() + "] implementation is required.");
    }
    this.classLoader = icl;
View Full Code Here

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

Examples of org.glassfish.api.deployment.InstrumentableClassLoader

        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

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

Examples of org.glassfish.api.deployment.InstrumentableClassLoader

     * 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

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

Examples of org.glassfish.api.deployment.InstrumentableClassLoader

     * 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
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.