Examples of ModuleContext


Examples of org.osoa.sca.ModuleContext

        // Associate the application module component with this thread
        tuscany.start();

        // Obtain SCA module context.
        ModuleContext moduleContext = CurrentModuleContext.getContext();

        // Locate the HelloWorld service component and invoke it
        Customer customer = (Customer) moduleContext.locateService("CustomerComponent");
        System.out.println("Main thread " + Thread.currentThread());
        customer.purchaseGoods();

    }
View Full Code Here

Examples of org.unidal.initialization.ModuleContext

  }

  @Override
  protected void initComponents(ServletConfig servletConfig) throws ServletException {
    try {
      ModuleContext ctx = new DefaultModuleContext(getContainer());
      ModuleInitializer initializer = ctx.lookup(ModuleInitializer.class);
      File clientXmlFile = getConfigFile(servletConfig, "cat-client-xml", "client.xml");
      File serverXmlFile = getConfigFile(servletConfig, "cat-server-xml", "server.xml");

      ctx.setAttribute("cat-client-config-file", clientXmlFile);
      ctx.setAttribute("cat-server-config-file", serverXmlFile);
      initializer.execute(ctx);
    } catch (Exception e) {
      m_exception = e;
      System.err.println(e);
      throw new ServletException(e);
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.