Package org.springframework.instrument.classloading

Examples of org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver


  }


  public void afterPropertiesSet() {
    if (this.loadTimeWeaver == null && InstrumentationLoadTimeWeaver.isInstrumentationAvailable()) {
      this.loadTimeWeaver = new InstrumentationLoadTimeWeaver(this.resourcePatternResolver.getClassLoader());
    }
    preparePersistenceUnitInfos();
  }
View Full Code Here


    containerEmfb.setPersistenceUnitName(entityManagerName);
    containerEmfb.setPersistenceProviderClass(DummyContainerPersistenceProvider.class);
    if (props != null) {
      containerEmfb.setJpaProperties(props);
    }
    containerEmfb.setLoadTimeWeaver(new InstrumentationLoadTimeWeaver());
    containerEmfb.setPersistenceXmlLocation(persistenceXml);
    containerEmfb.afterPropertiesSet();

    assertEquals(entityManagerName, actualPui.getPersistenceUnitName());
    if (props != null) {
View Full Code Here

  }


  public void afterPropertiesSet() {
    if (this.loadTimeWeaver == null && InstrumentationLoadTimeWeaver.isInstrumentationAvailable()) {
      this.loadTimeWeaver = new InstrumentationLoadTimeWeaver(this.resourcePatternResolver.getClassLoader());
    }
    preparePersistenceUnitInfos();
  }
View Full Code Here

  }


  public void afterPropertiesSet() {
    if (this.loadTimeWeaver == null && InstrumentationLoadTimeWeaver.isInstrumentationAvailable()) {
      this.loadTimeWeaver = new InstrumentationLoadTimeWeaver(this.resourcePatternResolver.getClassLoader());
    }
    preparePersistenceUnitInfos();
  }
View Full Code Here

  }

  public static void enableAspectJWeaving(LoadTimeWeaver weaverToUse, ClassLoader beanClassLoader) {
    if (weaverToUse == null) {
      if (InstrumentationLoadTimeWeaver.isInstrumentationAvailable()) {
        weaverToUse = new InstrumentationLoadTimeWeaver(beanClassLoader);
      }
      else {
        throw new IllegalStateException("No LoadTimeWeaver available");
      }
    }
View Full Code Here

      }
      this.loadTimeWeaver = serverSpecificLoadTimeWeaver;
    }
    else if (InstrumentationLoadTimeWeaver.isInstrumentationAvailable()) {
      logger.info("Found Spring's JVM agent for instrumentation");
      this.loadTimeWeaver = new InstrumentationLoadTimeWeaver(classLoader);
    }
    else {
      try {
        this.loadTimeWeaver = new ReflectiveLoadTimeWeaver(classLoader);
        logger.info("Using a reflective load-time weaver for class loader: " +
View Full Code Here

  }


  public void afterPropertiesSet() {
    if (this.loadTimeWeaver == null && InstrumentationSavingAgent.getInstrumentation() != null) {
      this.loadTimeWeaver = new InstrumentationLoadTimeWeaver();
    }
    preparePersistenceUnitInfos();
  }
View Full Code Here


  public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
    LoadTimeWeaver weaverToUse = this.loadTimeWeaver;
    if (weaverToUse == null && InstrumentationSavingAgent.getInstrumentation() != null) {
      weaverToUse = new InstrumentationLoadTimeWeaver();
    }
    weaverToUse.addTransformer(new AspectJClassBypassingClassFileTransformerDecorator(
          new ClassPreProcessorAgentAdapter()));
  }
View Full Code Here

      }
      this.loadTimeWeaver = serverSpecificLoadTimeWeaver;
    }
    else if (InstrumentationSavingAgent.getInstrumentation() != null) {
      logger.info("Found Spring's JVM agent for instrumentation");
      this.loadTimeWeaver = new InstrumentationLoadTimeWeaver();
    }
    else {
      try {
        this.loadTimeWeaver = new ReflectiveLoadTimeWeaver();
        logger.info("Using a reflective load-time weaver for class loader: " +
View Full Code Here


  public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
    LoadTimeWeaver weaverToUse = this.loadTimeWeaver;
    if (weaverToUse == null && InstrumentationLoadTimeWeaver.isInstrumentationAvailable()) {
      weaverToUse = new InstrumentationLoadTimeWeaver(this.beanClassLoader);
    }
    weaverToUse.addTransformer(new AspectJClassBypassingClassFileTransformer(
          new ClassPreProcessorAgentAdapter()));
  }
View Full Code Here

TOP

Related Classes of org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver

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.