code: public void init(ApplicationConfig config) {
          PropertyMap properties = config.getProperties();
  		String contextClassName = properties.getString("contextClass");
          if (contextClassName == null) {
              throw new IllegalArgumentException("contextClass");
          }
          
          try {
              contextClass = Class.forName(contextClassName);
              context = contextClass.newInstance();
              if (context instanceof Context) {
                  Context castContext = (Context) context;
                  ContextConfig contextConfig = new ContextConfig(
                      config.getProperties(), config.getLog(), 
                      config.getName(), config.getPlugins(),
                      config.getServletContext()
                  );
                  
                  castContext.init(contextConfig);
              }
          } catch (Exception e) {
              throw new RuntimeException(
                  "Unable to create context: " + contextClassName, e);
          }
      }
docs: Initialize the application.
  
  @param config The application configuration