当前位置: 首页>>代码示例>>Java>>正文


Java CachedIntrospectionResults.clearClassLoader方法代码示例

本文整理汇总了Java中org.springframework.beans.CachedIntrospectionResults.clearClassLoader方法的典型用法代码示例。如果您正苦于以下问题:Java CachedIntrospectionResults.clearClassLoader方法的具体用法?Java CachedIntrospectionResults.clearClassLoader怎么用?Java CachedIntrospectionResults.clearClassLoader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.beans.CachedIntrospectionResults的用法示例。


在下文中一共展示了CachedIntrospectionResults.clearClassLoader方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: runBare

import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
@Override
public void runBare() throws Throwable {
  testContextManager.prepareTestInstance(this); // this will initialize all dependencies
  try {
    super.runBare();
  }
  finally {
    testContextManager.afterTestClass();
    applicationContext.close();
    clearTestContextCache(testContextManager);
    applicationContext = null;
    processEngine = null;
    testContextManager = null;
    CachedIntrospectionResults.clearClassLoader(getClass().getClassLoader());
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:17,代码来源:SpringProcessEngineTestCase.java

示例2: reset

import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
/**
 * Reset all caches.
 */
public static void reset() {
    resetTypeVariableCache();
    resetAnnotationUtilsCache();
    resetReflectionUtilsCache();
    resetPropetyCache();
    CachedIntrospectionResults.clearClassLoader(ResetSpringStaticCaches.class.getClassLoader());
}
 
开发者ID:HotswapProjects,项目名称:HotswapAgent,代码行数:11,代码来源:ResetSpringStaticCaches.java

示例3: destroyJavaBeansCache

import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
private void destroyJavaBeansCache() {
    CachedIntrospectionResults.clearClassLoader(OsgiStringUtils.class.getClassLoader());
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:4,代码来源:JavaBeansCacheActivator.java

示例4: contextDestroyed

import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
@Override
public void contextDestroyed(ServletContextEvent event) {
	CachedIntrospectionResults.clearClassLoader(Thread.currentThread().getContextClassLoader());
	Introspector.flushCaches();
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:6,代码来源:IntrospectorCleanupListener.java

示例5: stop

import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
@Override
public void stop() throws Exception {
    // must clear this Spring cache to avoid any memory leaks
    CachedIntrospectionResults.clearClassLoader(getClass().getClassLoader());
    super.stop();
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:7,代码来源:XBeanBrokerService.java

示例6: contextDestroyed

import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
public void contextDestroyed(ServletContextEvent event) {
	CachedIntrospectionResults.clearClassLoader(Thread.currentThread().getContextClassLoader());
	Introspector.flushCaches();
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:5,代码来源:IntrospectorCleanupListener.java

示例7: registerBean

import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
@RequestMapping(method = RequestMethod.GET, value = "/registerBean")
@ResponseBody
private String registerBean(
		@RequestParam(value = "beanName", required = true) String beanName,
		@RequestParam(value = "beanType", required = true) String beanType) {
	try {

		/* String demoMessage = getDemoMessage(); */

		Class<?> c;

		c = Class.forName(beanType);

		CachedIntrospectionResults.clearClassLoader(c.getClassLoader());

		beanFactory.registerBean(c, beanName, "prototype", false, true);

		Object myBean = beanFactory.getBean(beanName);

		String ret = PAGE_HEADER
				+ SPRING_VERSION
				+ BEAN_INFO_MSG
				+ CLASSLOADER_DELAY
				+ BEAN_INFO_HEADER
				+ String.format(BEAN_INFO_FORMAT, beanName, myBean
						.getClass().getName(), myBean.toString()) /*
																 * +
																 * DEMO_MESSAGE_HEADER
																 * +
																 * tagHTML(
																 * "p",
																 * demoMessage
																 * )
																 */;

		if (LOGGER.isDebugEnabled()) {
			LOGGER.debug(beanType);
		}

		/* CachedIntrospectionResults cir; */
		/*
		 * 
		 * if (ClassUtils.isCacheSafe(beanClass,
		 * CachedIntrospectionResults.class.getClassLoader()) ||
		 * isClassLoaderAccepted(beanClass.getClassLoader())) {
		 */
		// CachedIntrospectionResults.clearClassLoader(c.getClassLoader());

		/* tripsDemo.getMessage(); */

		return ret;
	} catch (Exception e) {
		return String
				.format("Unable to create bean of type %s with the following error:</br>%s!",
						beanType, e.getMessage());
	}
}
 
开发者ID:techtrip,项目名称:dynamicbeanloader,代码行数:58,代码来源:DynamicBeanController.java

示例8: resetCommonCaches

import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
/**
 * Reset Spring's common core caches, in particular the {@link ReflectionUtils},
 * {@link ResolvableType} and {@link CachedIntrospectionResults} caches.
 * @since 4.2
 * @see ReflectionUtils#clearCache()
 * @see ResolvableType#clearCache()
 * @see CachedIntrospectionResults#clearClassLoader(ClassLoader)
 */
protected void resetCommonCaches() {
	ReflectionUtils.clearCache();
	ResolvableType.clearCache();
	CachedIntrospectionResults.clearClassLoader(getClassLoader());
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:14,代码来源:AbstractApplicationContext.java


注:本文中的org.springframework.beans.CachedIntrospectionResults.clearClassLoader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。