Package org.springframework.instrument.classloading

Examples of org.springframework.instrument.classloading.LoadTimeWeaver


  }

  @Bean(name=ConfigurableApplicationContext.LOAD_TIME_WEAVER_BEAN_NAME)
  @Role(BeanDefinition.ROLE_INFRASTRUCTURE)
  public LoadTimeWeaver loadTimeWeaver() {
    LoadTimeWeaver loadTimeWeaver = null;

    if (ltwConfigurer != null) {
      // the user has provided a custom LTW instance
      loadTimeWeaver = ltwConfigurer.getLoadTimeWeaver();
    }
View Full Code Here


  }

  @Bean(name=ConfigurableApplicationContext.LOAD_TIME_WEAVER_BEAN_NAME)
  @Role(BeanDefinition.ROLE_INFRASTRUCTURE)
  public LoadTimeWeaver loadTimeWeaver() {
    LoadTimeWeaver loadTimeWeaver = null;

    if (ltwConfigurer != null) {
      // the user has provided a custom LTW instance
      loadTimeWeaver = ltwConfigurer.getLoadTimeWeaver();
    }
View Full Code Here

  public DefaultContextLoadTimeWeaver(ClassLoader beanClassLoader) {
    setBeanClassLoader(beanClassLoader);
  }

  public void setBeanClassLoader(ClassLoader classLoader) {
    LoadTimeWeaver serverSpecificLoadTimeWeaver = createServerSpecificLoadTimeWeaver(classLoader);
    if (serverSpecificLoadTimeWeaver != null) {
      if (logger.isInfoEnabled()) {
        logger.info("Determined server-specific load-time weaver: " +
            serverSpecificLoadTimeWeaver.getClass().getName());
      }
      this.loadTimeWeaver = serverSpecificLoadTimeWeaver;
    }
    else if (InstrumentationLoadTimeWeaver.isInstrumentationAvailable()) {
      logger.info("Found Spring's JVM agent for instrumentation");
View Full Code Here

    return HIGHEST_PRECEDENCE;
  }


  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

  private LoadTimeWeaver loadTimeWeaver;


  public void setBeanClassLoader(ClassLoader classLoader) {
    LoadTimeWeaver serverSpecificLoadTimeWeaver = createServerSpecificLoadTimeWeaver(classLoader);
    if (serverSpecificLoadTimeWeaver != null) {
      if (logger.isInfoEnabled()) {
        logger.info("Determined server-specific load-time weaver: " +
            serverSpecificLoadTimeWeaver.getClass().getName());
      }
      this.loadTimeWeaver = serverSpecificLoadTimeWeaver;
    }
    else if (InstrumentationSavingAgent.getInstrumentation() != null) {
      logger.info("Found Spring's JVM agent for instrumentation");
View Full Code Here

    return HIGHEST_PRECEDENCE;
  }


  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

  }


  public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
    if (bean instanceof LoadTimeWeaverAware) {
      LoadTimeWeaver ltw = this.loadTimeWeaver;
      if (ltw == null) {
        Assert.state(this.beanFactory != null,
            "BeanFactory required if no LoadTimeWeaver explicitly specified");
        ltw = (LoadTimeWeaver) this.beanFactory.getBean(
            ConfigurableApplicationContext.LOAD_TIME_WEAVER_BEAN_NAME, LoadTimeWeaver.class);
View Full Code Here

  private LoadTimeWeaver loadTimeWeaver;


  public void setBeanClassLoader(ClassLoader classLoader) {
    LoadTimeWeaver serverSpecificLoadTimeWeaver = createServerSpecificLoadTimeWeaver(classLoader);
    if (serverSpecificLoadTimeWeaver != null) {
      if (logger.isInfoEnabled()) {
        logger.info("Determined server-specific load-time weaver: " +
            serverSpecificLoadTimeWeaver.getClass().getName());
      }
      this.loadTimeWeaver = serverSpecificLoadTimeWeaver;
    }
    else if (InstrumentationLoadTimeWeaver.isInstrumentationAvailable()) {
      logger.info("Found Spring's JVM agent for instrumentation");
View Full Code Here

    setBeanClassLoader(beanClassLoader);
  }

  @Override
  public void setBeanClassLoader(ClassLoader classLoader) {
    LoadTimeWeaver serverSpecificLoadTimeWeaver = createServerSpecificLoadTimeWeaver(classLoader);
    if (serverSpecificLoadTimeWeaver != null) {
      if (logger.isInfoEnabled()) {
        logger.info("Determined server-specific load-time weaver: " +
            serverSpecificLoadTimeWeaver.getClass().getName());
      }
      this.loadTimeWeaver = serverSpecificLoadTimeWeaver;
    }
    else if (InstrumentationLoadTimeWeaver.isInstrumentationAvailable()) {
      logger.info("Found Spring's JVM agent for instrumentation");
View Full Code Here


  @Bean(name=ConfigurableApplicationContext.LOAD_TIME_WEAVER_BEAN_NAME)
  @Role(BeanDefinition.ROLE_INFRASTRUCTURE)
  public LoadTimeWeaver loadTimeWeaver() {
    LoadTimeWeaver loadTimeWeaver = null;

    if (this.ltwConfigurer != null) {
      // the user has provided a custom LTW instance
      loadTimeWeaver = ltwConfigurer.getLoadTimeWeaver();
    }
View Full Code Here

TOP

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

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.