Package org.springframework.context.support

Examples of org.springframework.context.support.FileSystemXmlApplicationContext


//            e.printStackTrace(System.out);
//        }
//       
        //load the manager
       
        ApplicationContext context = new FileSystemXmlApplicationContext(Config.WEBINF +
                "/" + Config.APPCONTEXT);

        //get the knowledgemanager
        KnowledgeSphereManager manager = (KnowledgeSphereManager) context.getBean(Config.KNOWLEDGEMANAGER_PLUGINNAME);

        RpCommandLine command = new RpCommandLine(manager);

        //if the add operation was required  
        if (Config.OPERATION_ADD.equals(operation)) {
View Full Code Here


      // get the context
      configFile = args[0];
      workflowBean = args[1];

      // load the manager
      ApplicationContext context = new FileSystemXmlApplicationContext(
          configFile);

      // Todo remove the next bit and make more generic
      SpringStarter myBean = (SpringStarter) context
          .getBean(workflowBean);
      myBean.startWorkflow();
    }

  }
View Full Code Here

    private SmartLdapGroupStore() {
       
      // Spring tech...
      URL u = getClass().getResource("/properties/groups/SmartLdapGroupStoreConfig.xml");
    spring_context = new FileSystemXmlApplicationContext(u.toExternalForm());
   
    // Interval between tree rebuilds
    if (spring_context.containsBean("groupsTreeRefreshIntervalSeconds")) {
        groupsTreeRefreshIntervalSeconds = (Long) spring_context.getBean("groupsTreeRefreshIntervalSeconds");
    }
View Full Code Here

            .getMetadata(INGEST_CLIENT_TRANSFER_SERVICE_FACTORY));
      crawler.setFilemgrUrl(pgeMetadata.getMetadata(INGEST_FILE_MANAGER_URL));
      String crawlerConfigFile = pgeMetadata.getMetadata(CRAWLER_CONFIG_FILE);
      if (!Strings.isNullOrEmpty(crawlerConfigFile)) {
         crawler.setApplicationContext(
               new FileSystemXmlApplicationContext(crawlerConfigFile));
         List<String> actionIds = pgeMetadata.getAllMetadata(ACTION_IDS);
         if (actionIds != null) {
            crawler.setActionIds(actionIds);
         }
      }
View Full Code Here

    }
    // Check if the deployer failed
    // Register this class to receive Spring container notifications. Specifically, looking
    // for an even signaling the container termination. This is done so that we can stop
    // the monitor thread
    FileSystemXmlApplicationContext context = springDeployer.getSpringContext();
    context.addApplicationListener(this);
    springDeployer.startListeners();
   
    return springDeployer;
  }
View Full Code Here

        Iterator registryIterator = springContainerRegistry.keySet().iterator();
        while( registryIterator.hasNext()) {
          String id = (String)registryIterator.next();
          UimaEEAdminSpringContext springAdminContext = (UimaEEAdminSpringContext)springContainerRegistry.get(id);
          if ( springAdminContext != null ) {
            FileSystemXmlApplicationContext ctx =
              (FileSystemXmlApplicationContext)springAdminContext.getSpringContainer();
            if ( ctx != null ) {
              String[] listeners = ctx
              .getBeanNamesForType(org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.class);
              doStartListeners(listeners, ctx);
            }
          }
        }
View Full Code Here

      // threads. The completion of container deployment doesnt
      // necessarily mean that all beans have initialized completely.
      if (!springContextFile.startsWith("file:")) {
        springContextFile = "file:" + springContextFile;
      }
      context = new FileSystemXmlApplicationContext(springContextFile);
      return initializeContainer(context);
    } catch (ResourceInitializationException e) {
      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
       
        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "deploy",
View Full Code Here

    try {
      // Deploy beans in the Spring container. Although the deployment is
      // synchronous ( one bean at a time), some beans run in a separate
      // threads. The completion of container deployment doesnt
      // necessarily mean that all beans have initialized completely.
      context = new FileSystemXmlApplicationContext(springContextFiles);
      return initializeContainer(context);
    } catch (ResourceInitializationException e) {
      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
                "deploy", JmsConstants.JMS_LOG_RESOURCE_BUNDLE,
View Full Code Here

        if (getFileApplicationContextUri() != null) {
            String[] args = getFileApplicationContextUri().split(";");

            ApplicationContext parentContext = getParentApplicationContext();
            if (parentContext != null) {
                return new FileSystemXmlApplicationContext(args, parentContext);
            } else {
                return new FileSystemXmlApplicationContext(args);
            }
        }

        // default to classpath based
        String[] args = getApplicationContextUri().split(";");
View Full Code Here

      return ac;
    }
    catch(final BeanDefinitionStoreException e) {
      // presume the file could't be found at root of classpath
      // so fallback on a file-based class loader
      final FileSystemXmlApplicationContext ac = new FileSystemXmlApplicationContext(new String[] {
        beanDefRef.toString()
      }, false);
      ac.setClassLoader(AbstractEntityGraphPopulator.class.getClassLoader());
      ac.refresh();
      return ac;
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.context.support.FileSystemXmlApplicationContext

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.