Package org.springframework.context

Examples of org.springframework.context.ConfigurableApplicationContext.registerShutdownHook()


    }
    String keyString = contextKeyString(key);
    ConfigurableApplicationContext ctx = contextKeyToContextMap.get(keyString);
    if (ctx == null) {
      ctx = loadContext(key);
      ctx.registerShutdownHook();
      contextKeyToContextMap.put(keyString, ctx);
    }
    return ctx;
  }
View Full Code Here


    }
    String keyString = contextKeyString(key);
    ConfigurableApplicationContext ctx = contextKeyToContextMap.get(keyString);
    if (ctx == null) {
      ctx = loadContext(key);
      ctx.registerShutdownHook();
      contextKeyToContextMap.put(keyString, ctx);
    }
    return ctx;
  }
View Full Code Here

    String keyString = contextKeyString(key);
    ConfigurableApplicationContext ctx =
        (ConfigurableApplicationContext) contextKeyToContextMap.get(keyString);
    if (ctx == null) {
      ctx = loadContext(key);
      ctx.registerShutdownHook();
      contextKeyToContextMap.put(keyString, ctx);
    }
    return ctx;
  }
View Full Code Here

    String keyString = contextKeyString(key);
    ConfigurableApplicationContext ctx = (ConfigurableApplicationContext) contextKeyToContextMap.get(keyString);
    if (ctx == null) {
      ctx = loadContext(key);
      ctx.registerShutdownHook();
      contextKeyToContextMap.put(keyString, ctx);
    }
    return ctx;
  }
View Full Code Here

    String keyString = contextKeyString(key);
    ConfigurableApplicationContext ctx =
        (ConfigurableApplicationContext) contextKeyToContextMap.get(keyString);
    if (ctx == null) {
      ctx = loadContext(key);
      ctx.registerShutdownHook();
      contextKeyToContextMap.put(keyString, ctx);
    }
    return ctx;
  }
View Full Code Here

    }
    String keyString = contextKeyString(key);
    ConfigurableApplicationContext ctx = contextKeyToContextMap.get(keyString);
    if (ctx == null) {
      ctx = loadContext(key);
      ctx.registerShutdownHook();
      contextKeyToContextMap.put(keyString, ctx);
    }
    return ctx;
  }
View Full Code Here

      // Create, load, refresh and run the ApplicationContext
      context = createApplicationContext();
      if (this.registerShutdownHook) {
        try {
          context.registerShutdownHook();
        }
        catch (AccessControlException ex) {
          // Not allowed in some environments.
        }
      }
View Full Code Here

    return applicationContext.getBean(regionBeanName, Region.class);
  }

  protected ConfigurableApplicationContext newApplicationContext(final String... configLocations) {
    ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(configLocations);
    applicationContext.registerShutdownHook();
    return applicationContext;
  }

  @Test
  @Ignore
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.