Package org.springframework.context.support

Examples of org.springframework.context.support.ClassPathXmlApplicationContext.refresh()


    server = new Server();

    try {
      ClassPathXmlApplicationContext parentSpringAppContext =
          new ClassPathXmlApplicationContext();
      parentSpringAppContext.refresh();
      ConfigurableListableBeanFactory factory = parentSpringAppContext.
          getBeanFactory();
      factory.registerSingleton("guiceInjector",
          injector);
      factory.registerSingleton("passwordEncoder",
View Full Code Here


    checkDBVersion();

    try {
      ClassPathXmlApplicationContext parentSpringAppContext =
          new ClassPathXmlApplicationContext();
      parentSpringAppContext.refresh();
      ConfigurableListableBeanFactory factory = parentSpringAppContext.
          getBeanFactory();
      factory.registerSingleton("guiceInjector",
          injector);
      factory.registerSingleton("passwordEncoder",
View Full Code Here

    @Test
    public void testLoadBusWithApplicationContext() throws BusException {
        ClassPathXmlApplicationContext ctx =
            new ClassPathXmlApplicationContext(new String[] {"/org/apache/cxf/systest/bus/basic.xml"});
        Bus bus = ctx.getBean("cxf", Bus.class);
        ctx.refresh();
        bus = ctx.getBean("cxf", Bus.class);
        checkBindingExtensions(bus);
        checkHTTPTransportFactories(bus);
        checkOtherCoreExtensions(bus);
        ctx.close();
View Full Code Here

            throws Exception {

        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(
                new String[] { "/spring/applicationContext.xml" }, false);
        ctx.setClassLoader(cl);
        ctx.refresh();
    }
}
View Full Code Here

    }

    public static KieModuleModel fromXML(File kModuleFile, ReleaseId releaseId){
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(kModuleFile.getAbsolutePath());
        context.setConfigLocation(kModuleFile.getAbsolutePath());
        context.refresh();
        context.registerShutdownHook();
        return null;//kieSpringApplicationListener.getKieModuleModel();
    }

    public static KieModuleModel fromXML(java.net.URL kModuleUrl, String fixedPath, ReleaseId releaseId){
View Full Code Here

        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext();
        KModuleBeanFactoryPostProcessor beanFactoryPostProcessor = new KModuleBeanFactoryPostProcessor(kModuleUrl, fixedPath, context);
        beanFactoryPostProcessor.setReleaseId(releaseId);
        context.addBeanFactoryPostProcessor(beanFactoryPostProcessor);
        context.setConfigLocation(kModuleUrl.toExternalForm());
        context.refresh();
        context.registerShutdownHook();
        return null;//kieSpringApplicationListener.getKieModuleModel();
    }

    public static KieModuleModel fromXML(java.net.URL kModuleUrl, ReleaseId releaseId){
View Full Code Here

        dataDirectory.init("test", appDir, new ServiceConfig(), null);
        LuceneConfig lc = new LuceneConfig();
        lc._geonetworkDataDirectory = dataDirectory;
        final ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext();
        lc._appContext = context;
        context.refresh();
        lc.configure(configFile);

        _tokenizedFieldSet = lc.getTokenizedField();
        _numericFieldSet = lc.getNumericFields();
    }
View Full Code Here

    checkDBVersion();

    try {
      ClassPathXmlApplicationContext parentSpringAppContext =
          new ClassPathXmlApplicationContext();
      parentSpringAppContext.refresh();
      ConfigurableListableBeanFactory factory = parentSpringAppContext.
          getBeanFactory();
      factory.registerSingleton("guiceInjector",
          injector);
      factory.registerSingleton("passwordEncoder",
View Full Code Here

    public void startUp(ConfigurationContext ignore, AxisService service) {
        ClassLoader classLoader = service.getClassLoader();
        ClassPathXmlApplicationContext appCtx = new
            ClassPathXmlApplicationContext(new String[] {"applicationContext.xml"}, false);
        appCtx.setClassLoader(classLoader);
        appCtx.refresh();
        if (logger.isDebugEnabled()) {
            logger.debug("\n\nstartUp() set spring classloader via axisService.getClassLoader() ... ");
        }
    }
    /**
 
View Full Code Here

    checkDBVersion();

    try {
      ClassPathXmlApplicationContext parentSpringAppContext =
          new ClassPathXmlApplicationContext();
      parentSpringAppContext.refresh();
      ConfigurableListableBeanFactory factory = parentSpringAppContext.
          getBeanFactory();
      factory.registerSingleton("guiceInjector",
          injector);
      factory.registerSingleton("passwordEncoder",
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.