Examples of DefaultContext


Examples of org.apache.avalon.framework.context.DefaultContext

        Hierarchy.getDefaultHierarchy().setDefaultLogTarget(servTarget);
        Hierarchy.getDefaultHierarchy().setDefaultPriority(logPriority);
        final Logger logger = Hierarchy.getDefaultHierarchy().getLoggerFor("");
        final DefaultLogKitManager logKitManager = new DefaultLogKitManager(Hierarchy.getDefaultHierarchy());
        logKitManager.setLogger(logger);
        final DefaultContext subcontext = new DefaultContext(this.appContext);
        subcontext.put("servlet-context", this.servletContext);
        subcontext.put("context-root", this.servletContext.getRealPath("/"));

        try {
            logKitManager.contextualize(subcontext);
            this.logKitManager = logKitManager;
View Full Code Here

Examples of org.apache.avalon.framework.context.DefaultContext

                 conf = new File(configFile);
                 if(!conf.exists())
                     conf = new File(context, configFile);
            }

            DefaultContext appContext = new DefaultContext();
            appContext.put(Constants.CONTEXT_CLASS_LOADER, Main.class.getClassLoader());
            CommandlineContext clContext = new CommandlineContext(contextDir);
            clContext.setLogger(log);
            appContext.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, clContext);
            DefaultLogKitManager logKitManager = null;
            if (logKit != null) {
                final FileInputStream fis = new FileInputStream(logKit);
                final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
                final Configuration logKitConf = builder.build(fis);
                logKitManager = new DefaultLogKitManager(Hierarchy.getDefaultHierarchy());
                logKitManager.setLogger(log);
                final DefaultContext subcontext = new DefaultContext(appContext);
                subcontext.put("context-root", contextDir);
                logKitManager.contextualize(subcontext);
                logKitManager.configure(logKitConf);
                logKitManager = logKitManager;
                if (logger != null) {
                    log = logKitManager.getLogger(logger);
View Full Code Here

Examples of org.apache.avalon.framework.context.DefaultContext

        Hierarchy.getDefaultHierarchy().setDefaultLogTarget(servTarget);
        Hierarchy.getDefaultHierarchy().setDefaultPriority(logPriority);
        final Logger logger = Hierarchy.getDefaultHierarchy().getLoggerFor("");
        final DefaultLogKitManager logKitManager = new DefaultLogKitManager(Hierarchy.getDefaultHierarchy());
        logKitManager.setLogger(logger);
        final DefaultContext subcontext = new DefaultContext(this.appContext);
        subcontext.put("servlet-context", this.servletContext);
        if (this.servletContextPath == null) {
            File logSCDir = new File(this.workDir, "log");
            logSCDir.mkdirs();
            if (logger.isWarnEnabled()) {
                logger.warn("Setting servlet-context for LogKit to " + logSCDir);
            }
            subcontext.put("context-root", logSCDir.toString());
        } else {
            subcontext.put("context-root", this.servletContextPath);
        }

        try {
            logKitManager.contextualize(subcontext);
            this.logKitManager = logKitManager;
View Full Code Here

Examples of org.apache.avalon.framework.context.DefaultContext

      this.manager.setRoleManager(roles);
        }
        // Setup ECM
        this.manager.setLoggerManager(lm);
        this.manager.enableLogging(lm.getLoggerForCategory("org.apache.fulcrum"));
        DefaultContext context = new DefaultContext();
        String absolutePath = new File("").getAbsolutePath();
        context.put(COMPONENT_APP_ROOT, absolutePath);
        context.put(URN_AVALON_HOME, absolutePath);
        this.manager.contextualize(context);
       
        this.manager.configure(sysConfig);
        // Init ECM!!!!
        this.manager.initialize();
View Full Code Here

Examples of org.apache.avalon.framework.context.DefaultContext

            usersStore = (UsersStore) compMgr.lookup( UsersStore.ROLE );
        } catch (Exception e) {
            getLogger().warn("Can't get Store: " + e);
        }
        getLogger().debug("Using UsersStore: " + usersStore.toString());
        context = new DefaultContext();

        String hostName = null;
        try {
            hostName = InetAddress.getLocalHost().getHostName();
        } catch  (UnknownHostException ue) {
View Full Code Here

Examples of org.apache.avalon.framework.context.DefaultContext

    private Configuration rmiObjects;


    public void contextualize(Context context)
            throws ContextException {
        this.context = new DefaultContext(context);
    }
View Full Code Here

Examples of org.apache.avalon.framework.context.DefaultContext

            usersStore = (UsersStore) compMgr.lookup( UsersStore.ROLE );
        } catch (Exception e) {
            getLogger().warn("Can't get Store: " + e);
        }
        getLogger().debug("Using UsersStore: " + usersStore.toString());
        context = new DefaultContext();

        String hostName = null;
        try {
            hostName = InetAddress.getLocalHost().getHostName();
        } catch  (UnknownHostException ue) {
View Full Code Here

Examples of org.apache.avalon.framework.context.DefaultContext

        this.conf = conf;
        threads = conf.getChild("threads").getValueAsInteger(1);
    }

    public void contextualize(Context context) {
        this.context = new DefaultContext( context );
    }
View Full Code Here

Examples of org.apache.catalina.DefaultContext

     *
     * @param defaultContext The newly associated DefaultContext
     */
    public void setDefaultContext(DefaultContext defaultContext) {

        DefaultContext oldDefaultContext = this.defaultContext;
        this.defaultContext = defaultContext;
        support.firePropertyChange("defaultContext", oldDefaultContext, this.defaultContext);

    }
View Full Code Here

Examples of org.apache.catalina.DefaultContext

     *
     * @param defaultContext The newly associated DefaultContext
     */
    public void setDefaultContext(DefaultContext defaultContext) {

        DefaultContext oldDefaultContext = this.defaultContext;
        this.defaultContext = defaultContext;
        support.firePropertyChange("defaultContext", oldDefaultContext, this.defaultContext);

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