Examples of FileSystemResource


Examples of org.springframework.core.io.FileSystemResource

    fw.write(SPRING_XML3);
    fw.close();


   
    BeanFactory beanFactory = new XmlBeanFactory(new FileSystemResource(file));
    IServer server = (IServer) beanFactory.getBean("server");

    if (!server.isOpen()) {
      System.out.println("server should be open");
      Assert.fail("server should be open");
View Full Code Here

Examples of org.springframework.core.io.FileSystemResource

    fw.write(SPRING_XML4);
    fw.close();


   
    BeanFactory beanFactory = new XmlBeanFactory(new FileSystemResource(file));
    HttpClient httpClient = (HttpClient) beanFactory.getBean("httpClient");
    Assert.assertEquals(30, httpClient.getMaxIdle());
    Assert.assertEquals(60000, httpClient.getResponseTimeoutMillis());

View Full Code Here

Examples of org.springframework.core.io.FileSystemResource

    File file = QAUtil.createTempfile();
    FileWriter fw = new FileWriter(file);
    fw.write(SPRING_XML);
    fw.close();
   
    BeanFactory beanFactory = new XmlBeanFactory(new FileSystemResource(file));
    IServer server = (IServer) beanFactory.getBean("server");

    if (!server.isOpen()) {
      System.out.println("server should be open");
      Assert.fail("server should be open");
View Full Code Here

Examples of org.springframework.core.io.FileSystemResource

    File file = QAUtil.createTempfile();
    FileWriter fw = new FileWriter(file);
    fw.write(SPRING_XML2);
    fw.close();

    BeanFactory beanFactory = new XmlBeanFactory(new FileSystemResource(file));
    IServer server = (IServer) beanFactory.getBean("server");
   
    if (!server.isOpen()) {
      System.out.println("server should be open");
      Assert.fail("server should be open");
View Full Code Here

Examples of org.springframework.core.io.FileSystemResource

    fw.write(SPRING_XML3);
    fw.close();


   
    BeanFactory beanFactory = new XmlBeanFactory(new FileSystemResource(file));
    IServer server = (IServer) beanFactory.getBean("server");

    if (!server.isOpen()) {
      System.out.println("server should be open");
      Assert.fail("server should be open");
View Full Code Here

Examples of org.springframework.core.io.FileSystemResource

    fw.write(SPRING_XML4);
    fw.close();


   
    BeanFactory beanFactory = new XmlBeanFactory(new FileSystemResource(file));
    HttpClient httpClient = (HttpClient) beanFactory.getBean("httpClient");
    Assert.assertEquals(30, httpClient.getMaxIdle());
    Assert.assertEquals(60000, httpClient.getResponseTimeoutMillis());

View Full Code Here

Examples of org.springframework.core.io.FileSystemResource

   * the upgrade history from the olatdata directory
   */
  public void init() {
    if (Settings.isJUnitTest()) return;
    // load upgrades using spring framework
    XmlBeanFactory upgradeFactory = new XmlBeanFactory(new FileSystemResource(WebappHelper.getContextRoot() + "/WEB-INF/" + UPGRADES_FILE));
    UpgradesDefinitions upgradeDefinitions = (UpgradesDefinitions) upgradeFactory.getBean("olatupgrades");
    upgrades = upgradeDefinitions.getUpgrades();
    // load history of previous upgrades using xstream
    initUpgradesHistories();
  }
View Full Code Here

Examples of org.springframework.core.io.FileSystemResource

 
  public static ExtensionManager getInstance() { return INSTANCE; }
 
  public void init() {
    //TODO:fj:cleanup ExtManager and ExtensionManager
    FileSystemResource pluginConfigFile = new FileSystemResource(WebappHelper.getContextRoot() + "/WEB-INF/" + EXTENSIONS_FILE);
    pluginFactory = new XmlBeanFactory(pluginConfigFile);
    // get all configured beand and load them to initialize the classes properly
    String[] beanFactories = pluginFactory.getBeanDefinitionNames();
    int i = 0;
    try {
      for(/*i already declared*/; i < beanFactories.length; i++){
        pluginFactory.getBean(beanFactories[i]);
        Tracing.logInfo("Initializing OLATExtension::" + beanFactories[i]
              + " from plugin factory::"
              + pluginConfigFile.getFile().getAbsolutePath(),
              ExtensionManager.class);
      }
    } catch (BeansException e) {
      throw new StartupException("Error deploying extensions! ["+beanFactories[i]+"] Make sure your application server has write access to your olat installation: ", e);
    }
View Full Code Here

Examples of org.springframework.core.io.FileSystemResource

   * @return the instance
   */
  public static synchronized ExtManager getInstance() { //o_clusterOK by:fj
    // use spring here
    if (instance == null) {
      XmlBeanFactory pluginFactory = new XmlBeanFactory(new FileSystemResource(WebappHelper.getContextRoot() + "/WEB-INF/" + EXTENSIONS_FILE));
      instance = (ExtManager) pluginFactory.getBean("extmanager");
    }
    return instance;
  }
View Full Code Here

Examples of org.springframework.core.io.FileSystemResource

            reader.loadBeanDefinitions(new UrlResource(url));
        }
       
        for (String pathname : additionalFilePathnames) {
            try {
                reader.loadBeanDefinitions(new FileSystemResource(pathname));
            } catch (BeanDefinitionStoreException bdse) {
                throw new ToolException("Unable to open bean definition file " + pathname, bdse.getCause());
            }
        }
        appContext.refresh();
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.