Examples of addLifeCycleListener()


Examples of org.apache.catalina.core.StandardContext.addLifecycleListener()

            // Set our naming context listener
            EasyBeansNamingContextListener namingContextListener = new EasyBeansNamingContextListener();
            namingContextListener.setEncBindingHolder(encBindingHolder);
            namingContextListener.setInjectionHolder(ejbInjectionHolder);
            namingContextListener.setName(getNamingContextName(standardContext));
            standardContext.addLifecycleListener(namingContextListener);
            standardContext.setNamingContextListener(namingContextListener);

            // Start the context
            try {
                standardContext.start();
View Full Code Here

Examples of org.apache.catalina.core.StandardContext.addLifecycleListener()

      JaccContextValve jaccValve = new JaccContextValve(metaData, cs);
      context.addValve(jaccValve);

      // Set listener
      context.setConfigClass("org.jboss.web.tomcat.service.deployers.JBossContextConfig");
      context.addLifecycleListener(new EncListener(loader, webLoader, injectionContainer, webApp));
     
      // Pass the metadata to the RunAsListener via a thread local
      RunAsListener.metaDataLocal.set(metaData);
      JBossContextConfig.metaDataLocal.set(metaData);
      JBossContextConfig.deployerConfig.set(config);
View Full Code Here

Examples of org.apache.catalina.core.StandardContext.addLifecycleListener()

    public void deployWebApps(AppInfo appInfo, ClassLoader classLoader) throws Exception {
        for (WebAppInfo webApp : appInfo.webApps) {
            if (getContextInfo(webApp) == null) {
                StandardContext standardContext = new StandardContext();
                standardContext.addLifecycleListener(new ContextConfig());
                standardContext.setPath("/" + webApp.contextRoot);
                standardContext.setDocBase(webApp.codebase);
                standardContext.setParentClassLoader(classLoader);
                standardContext.setDelegate(true);
View Full Code Here

Examples of org.apache.catalina.core.StandardContext.addLifecycleListener()

        context.setParentClassLoader(classLoader);
        context.setDelegate(true);

        // Tomcat has a stupid rule where a life cycle listener must set
        // configured true, or it will treat it as a failed deployment
        context.addLifecycleListener(new LifecycleListener() {
            public void lifecycleEvent(LifecycleEvent event) {
                if (event.getType().equals(Lifecycle.START_EVENT)) {
                    Context context = (Context) event.getLifecycle();
                    context.setConfigured(true);
                }
View Full Code Here

Examples of org.apache.catalina.core.StandardContext.addLifecycleListener()

        context.setParentClassLoader(classLoader);
        context.setDelegate(true);

        // Tomcat has a stupid rule where a life cycle listener must set
        // configured true, or it will treat it as a failed deployment
        context.addLifecycleListener(new LifecycleListener() {
            public void lifecycleEvent(LifecycleEvent event) {
                Context context = (Context) event.getLifecycle();

                if (event.getType().equals(Lifecycle.BEFORE_START_EVENT)) {
                    context.getServletContext().setAttribute(IGNORE_CONTEXT, "true");
View Full Code Here

Examples of org.apache.catalina.core.StandardContext.addLifecycleListener()

    public synchronized void addChild(Container child) {
        if (!(child instanceof StandardContext)) {
            throw new IllegalArgumentException(sm.getString("tuscanyHost.notContext"));
        }
        StandardContext ctx = (StandardContext) child;
        ctx.addLifecycleListener(new TuscanyContextListener(runtime, modelFactory, modelLoader));
        super.addChild(child);
    }

    public String toString() {
        StringBuilder sb = new StringBuilder(132);
View Full Code Here

Examples of org.apache.catalina.core.StandardContext.addLifecycleListener()

        // caution: this sets the parent of the webapp loader to the test classloader so it can find TestServlet
        // anything that relies on the TCCL may not work correctly
        ClassLoader cl = TestServlet.class.getClassLoader();
        ctx.setParentClassLoader(cl);

        ctx.addLifecycleListener(new ContextConfig());
        ctx.setName("/testContext");
        ctx.setDocBase(app2.getAbsolutePath());

// Doesn't work, see TUSCANY-328       
//        host.addChild(ctx);
View Full Code Here

Examples of org.apache.catalina.core.StandardContext.addLifecycleListener()

        context.setXmlNamespaceAware(xmlNamespaceAware);
        context.setTldValidation(tldValidation);
        context.setTldNamespaceAware(tldNamespaceAware);
       
        ContextConfig contextConfig = new ContextConfig();
        context.addLifecycleListener(contextConfig);

        // Add the new instance to its parent component
        ObjectName pname = new ObjectName(parent);
        ObjectName deployer = new ObjectName(pname.getDomain()+
                                             ":type=Deployer,host="+
View Full Code Here

Examples of org.apache.catalina.core.StandardContext.addLifecycleListener()

    private StandardContext startWebApp(Host host) throws Exception {
        StandardContext context = new StandardContext();
        try {
            context.setPath(contextRoot);
            context.addLifecycleListener(new ContextConfig());
            File docBase = new File(serverTempDir, contextRoot);
            if (!docBase.exists()) {
                docBase.mkdirs();
            }
            context.setDocBase(docBase.getPath());
View Full Code Here

Examples of org.apache.catalina.core.StandardContext.addLifecycleListener()

    private static StandardContext startWebApp(Host host, WSEndpointDeploymentUnit unit) throws Exception {
        StandardContext context = new StandardContext();
        try {
            JBossWebMetaData jbwebMD = unit.getAttachment(WSAttachmentKeys.JBOSSWEB_METADATA_KEY);
            context.setPath(jbwebMD.getContextRoot());
            context.addLifecycleListener(new ContextConfig());
            ServerConfigService config = (ServerConfigService)unit.getServiceRegistry().getService(WSServices.CONFIG_SERVICE).getService();
            File docBase = new File(config.getValue().getServerTempDir(), jbwebMD.getContextRoot());
            if (!docBase.exists()) {
                docBase.mkdirs();
            }
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.