Examples of RuntimeFactory


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

Examples of com.ibm.commons.runtime.RuntimeFactory

  }
  @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

Examples of com.ibm.commons.runtime.RuntimeFactory

    }
    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

Examples of com.ibm.commons.runtime.RuntimeFactory

  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

Examples of com.ibm.commons.runtime.RuntimeFactory

   * 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

Examples of io.nodyn.runtime.RuntimeFactory

    public static void main(String... args) throws InterruptedException {
        System.setProperty( "nodyn.binary", "./bin/node" );
        //System.setProperty("javax.net.debug", "all");

        RuntimeFactory factory = RuntimeFactory.init(TestRunner.class.getClassLoader(), RuntimeFactory.RuntimeType.DYNJS);
        NodynConfig config = new NodynConfig( new String[] { "-e", SCRIPT } );
        Nodyn nodyn = factory.newRuntime(config);
        nodyn.setExitHandler( new NoOpExitHandler() );
        try {
            int exitCode = nodyn.run();
            if (exitCode != 0) {
                throw new TestFailureException();
View Full Code Here

Examples of io.nodyn.runtime.RuntimeFactory

        System.err.println( "v" + Nodyn.NODE_VERSION + " (v" + Nodyn.VERSION + ")" );
        return 0;
    }

    protected int runNormal() {
        RuntimeFactory factory = RuntimeFactory.init(this.config.getClassLoader(), RuntimeFactory.RuntimeType.DYNJS);
        this.nodyn = factory.newRuntime(config);
        try {
            return this.nodyn.run();
        } catch (Throwable t) {
            this.nodyn.handleThrowable(t);
        }
View Full Code Here

Examples of org.jboss.gravia.runtime.spi.RuntimeFactory

     * </ol>
     */
    public static Runtime createRuntime(PropertiesProvider props) {
        NotNullException.assertValue(props, "props");

        RuntimeFactory factory = null;
        String className = (String) props.getProperty(RuntimeFactory.class.getName());
        if (className != null) {
            try {
                factory = (RuntimeFactory) Class.forName(className).newInstance();
            } catch (Exception ex) {
View Full Code Here

Examples of org.jboss.gravia.runtime.spi.RuntimeFactory

    @Override
    public void contextInitialized(ServletContextEvent event) {
        ServletContext servletContext = event.getServletContext();
        Runtime runtime = RuntimeLocator.getRuntime();
        if (runtime == null) {
            RuntimeFactory runtimeFactory = new TomcatRuntimeFactory();
            DefaultPropertiesProvider propsProvider = new DefaultPropertiesProvider();
            runtime = RuntimeLocator.createRuntime(runtimeFactory, propsProvider);
            runtime.init();
        }
        Module module = installWebappModule(runtime, servletContext);
View Full Code Here

Examples of org.jboss.gravia.runtime.spi.RuntimeFactory

     * </ol>
     */
    public static Runtime createRuntime(PropertiesProvider props) {
        NotNullException.assertValue(props, "props");

        RuntimeFactory factory = null;
        String className = (String) props.getProperty(RuntimeFactory.class.getName());
        if (className != null) {
            try {
                factory = (RuntimeFactory) Class.forName(className).newInstance();
            } catch (Exception ex) {
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.