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


Java RiceResourceLoaderFactory类代码示例

本文整理汇总了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;

}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:48,代码来源:KENTestCase.java

示例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());
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:5,代码来源:ModuleConfigurer.java


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