Package org.unidal.initialization

Examples of org.unidal.initialization.ModuleContext.lookup()


  @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);
View Full Code Here


    initialize(container, configFile);
  }

  public static void initialize(PlexusContainer container, File configFile) {
    ModuleContext ctx = new DefaultModuleContext(container);
    Module module = ctx.lookup(Module.class, CatClientModule.ID);

    if (!module.isInitialized()) {
      ModuleInitializer initializer = ctx.lookup(ModuleInitializer.class);

      ctx.setAttribute("cat-client-config-file", configFile);
View Full Code Here

  public static void initialize(PlexusContainer container, File configFile) {
    ModuleContext ctx = new DefaultModuleContext(container);
    Module module = ctx.lookup(Module.class, CatClientModule.ID);

    if (!module.isInitialized()) {
      ModuleInitializer initializer = ctx.lookup(ModuleInitializer.class);

      ctx.setAttribute("cat-client-config-file", configFile);
      initializer.execute(ctx, module);
    }
  }
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.