本文整理汇总了Java中org.kuali.rice.core.framework.resourceloader.RiceResourceLoaderFactory类的典型用法代码示例。如果您正苦于以下问题:Java RiceResourceLoaderFactory类的具体用法?Java RiceResourceLoaderFactory怎么用?Java RiceResourceLoaderFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RiceResourceLoaderFactory类属于org.kuali.rice.core.framework.resourceloader包,在下文中一共展示了RiceResourceLoaderFactory类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNotificationPerTestLifecycles
import org.kuali.rice.core.framework.resourceloader.RiceResourceLoaderFactory; //导入依赖的package包/类
protected List<Lifecycle> getNotificationPerTestLifecycles() {
List<Lifecycle> lifecycles = new ArrayList<Lifecycle>();
lifecycles.add(new BaseLifecycle() {
@Override
public void start() throws Exception {
// get the composite Rice Spring context
BeanFactory moduleContext = CompositeBeanFactory.createBeanFactory(
RiceResourceLoaderFactory.getSpringResourceLoaders());
// This method sets up the Spring services so that they can be accessed by the tests.
services = new SpringNotificationServiceLocator(moduleContext);
// grab the module's transaction manager
transactionManager = (PlatformTransactionManager) moduleContext.getBean(TX_MGR_BEAN_NAME, PlatformTransactionManager.class);
super.start();
}
});
// clear out the KEW cache
lifecycles.add(new BaseLifecycle() {
@Override
public void start() throws Exception {
super.start();
LOG.info("Status of Ken scheduler on start: " + (services.getScheduler().isStarted() ? "started" : "stopped"));
// stop quartz if a test failed to do so
disableQuartzJobs();
}
public void stop() throws Exception {
//KsbApiServiceLocator.getCacheAdministrator().flushAll();
LOG.info("Status of Ken scheduler on stop: " + (services.getScheduler().isStarted() ? "started" : "stopped"));
// stop quartz if a test failed to do so
disableQuartzJobs();
super.stop();
}
});
// load the default SQL
//lifecycles.add(new SQLDataLoaderLifecycle("classpath:org/kuali/rice/ken/test/DefaultPerTestData.sql", ";"));
//lifecycles.add(new KEWXmlDataLoaderLifecycle("classpath:org/kuali/rice/ken/test/DefaultPerTestData.xml"));
return lifecycles;
}
示例2: createResourceLoader
import org.kuali.rice.core.framework.resourceloader.RiceResourceLoaderFactory; //导入依赖的package包/类
protected ResourceLoader createResourceLoader(ServletContext servletContext, List<String> files, String moduleName) {
return RiceResourceLoaderFactory.createRootRiceResourceLoader(servletContext, files,
getModuleName());
}