Package org.geomajas.spring

Examples of org.geomajas.spring.ReconfigurableApplicationContext


  private final Logger log = LoggerFactory.getLogger(RefreshConfigurationCommand.class);

  public void execute(RefreshConfigurationRequest request, RefreshConfigurationResponse response) throws Exception {
    if (context instanceof ReconfigurableApplicationContext) {
      ReconfigurableApplicationContext rollback = (ReconfigurableApplicationContext) context;
      if (request.getConfigLocations() != null) {
        ArrayList<String> configLocations = new ArrayList<String>();
        configLocations.add("org/geomajas/spring/geomajasContext.xml");

        configLocations.addAll(Arrays.asList(request.getConfigLocations()));
        try {
          rollback.refresh(configLocations.toArray(new String[configLocations.size()]));
        } catch (GeomajasException e) {
          log.error("Could not refresh context", e);
          rollback.rollback();
          response.setApplicationNames(context.getBeanNamesForType(ClientApplicationInfo.class));
          throw e;
        }
        response.setApplicationNames(context.getBeanNamesForType(ClientApplicationInfo.class));
      }
View Full Code Here

TOP

Related Classes of org.geomajas.spring.ReconfigurableApplicationContext

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.