Package com.ibm.commons.runtime

Examples of com.ibm.commons.runtime.RuntimeFactory


  @Override
  public synchronized Application initApplication(Object servletContext) {
    ClassLoader cl = getContextClassLoader();
    AbstractApplication app = applications.get(cl);
    if(app==null) {
      RuntimeFactory rtFactory = RuntimeFactory.get();
      app = (AbstractApplication)rtFactory.createApplication(servletContext);
      applications.put(cl,app);
    }
    app._incReferences();
    return app;
  }
View Full Code Here


  }
  @Override
  public Context initContext(Application application, Object request, Object response) {
    AbstractContext ctx = contexts.get();
    if(ctx==null) {
      RuntimeFactory rtFactory = RuntimeFactory.get();
      ctx = (AbstractContext)rtFactory.createContext(application, request, response);
      contexts.set(ctx);
    }
    ctx._incReferences();
    return ctx;
  }
View Full Code Here

    }
    return executeScript(mockLib, mnemonic);
  }

  public final void setUpJavaSide() {
    RuntimeFactory runtimeFactory = new RuntimeFactoryStandalone();
    application = runtimeFactory.initApplication(null);
    context = com.ibm.commons.runtime.Context.init(application, null, null);
    TestEnvironment.setRequiresAuthentication(true);
  }
View Full Code Here

  protected Properties properties = new Properties();
 
 
  @Before
  public final void setUp() {
    RuntimeFactory runtimeFactory = new RuntimeFactoryStandalone();
    application = runtimeFactory.initApplication(null);
    context = Context.init(application, null, null);
    TestEnvironment.setRequiresAuthentication(true);
    loadProperties();
  }
View Full Code Here

   * Create the context (if needed)
   */
  protected Context createContext() {

    if (context == null) {
      RuntimeFactory runtimeFactory = new RuntimeFactoryStandalone() {
        @Override
        public Context initContext(Application application,
            Object request, Object response) {
          Context context = super.initContext(application, request,
              response);
          TestEnvironmentFactory.getEnvironment().decorateContext(
              context);
          return context;
        }
      };
      application = runtimeFactory.initApplication(null);
      context = Context.init(application, null, null);
    }
    return context;
  }
View Full Code Here

TOP

Related Classes of com.ibm.commons.runtime.RuntimeFactory

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.