Package org.apache.catalina.core

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


                                if (state == 0) {
                                    // context only initialized
                                    tomcatWebAppBuilder.init(standardContext);
                                } else if (state == 1) {
                                    // context already started
                                    standardContext.addParameter("openejb.start.late", "true");
                                    ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
                                    Thread.currentThread().setContextClassLoader(standardContext.getLoader().getClassLoader());
                                    try {
                                        tomcatWebAppBuilder.init(standardContext);
                                        tomcatWebAppBuilder.beforeStart(standardContext);
View Full Code Here


                                if (state == 0) {
                                    // context only initialized
                                    tomcatWebAppBuilder.init(standardContext);
                                } else if (state == 1) {
                                    // context already started
                                    standardContext.addParameter("openejb.start.late", "true");
                                    ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
                                    Thread.currentThread().setContextClassLoader(standardContext.getLoader().getClassLoader());
                                    try {
                                        tomcatWebAppBuilder.init(standardContext);
                                        tomcatWebAppBuilder.beforeStart(standardContext);
View Full Code Here

                    break;
                case Lifecycle.BEFORE_START_EVENT:
                    contextListener.beforeStart(standardContext);
                    break;
                case Lifecycle.START_EVENT:
                    standardContext.addParameter("openejb.start.late", "true");
                    contextListener.start(standardContext);
                    break;
                case Lifecycle.AFTER_START_EVENT:
                    contextListener.afterStart(standardContext);
                    standardContext.removeParameter("openejb.start.late");
View Full Code Here

                                if (state == 0) {
                                    // context only initialized
                                    tomcatWebAppBuilder.init(standardContext);
                                } else if (state == 1) {
                                    // context already started
                                    standardContext.addParameter("openejb.start.late", "true");
                                    final ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
                                    Thread.currentThread().setContextClassLoader(standardContext.getLoader().getClassLoader());
                                    try {
                                        tomcatWebAppBuilder.init(standardContext);
                                        tomcatWebAppBuilder.beforeStart(standardContext);
View Full Code Here

                                if (state == 0) {
                                    // context only initialized
                                    tomcatWebAppBuilder.init(standardContext);
                                } else if (state == 1) {
                                    // context already started
                                    standardContext.addParameter("openejb.start.late", "true");
                                    ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
                                    Thread.currentThread().setContextClassLoader(standardContext.getLoader().getClassLoader());
                                    try {
                                        tomcatWebAppBuilder.init(standardContext);
                                        tomcatWebAppBuilder.beforeStart(standardContext);
View Full Code Here

                contextListener.init(standardContext);
            } else if (Lifecycle.BEFORE_START_EVENT.equals(type)) {
                contextListener.beforeStart(standardContext);
            } else if (Lifecycle.START_EVENT.equals(type)) {
                if (TomcatHelper.isTomcat7()) {
                    standardContext.addParameter("openejb.start.late", "true");
                }

                contextListener.start(standardContext);
            } else if (Lifecycle.AFTER_START_EVENT.equals(type)) {
                contextListener.afterStart(standardContext);
View Full Code Here

            log.info("Deployed webapp: " + webapp);
        } catch (Throwable e) {
            //catching a Throwable here to avoid web-apps crashing the server during startup
            StandardContext context = new StandardContext();
            context.setName(webappFile.getName());
            context.addParameter(WebappsConstants.FAULTY_WEBAPP, "true");
            JaggeryApplication webapp = new JaggeryApplication(this, context, webappFile);
            webapp.setProperty(WebappsConstants.WEBAPP_FILTER, JaggeryConstants.JAGGERY_WEBAPP_FILTER_PROP);
            String msg = "Error while deploying webapp: " + webapp;
            log.error(msg, e);
            webapp.setFaultReason(new Exception(msg, e));
View Full Code Here

      context.setJarScanner(new NullJarScanner());
      configureRails(props, context);

      for (Map.Entry<Object, Object> entry : props.rawProperties().entrySet()) {
        String key = entry.getKey().toString();
        context.addParameter(key, entry.getValue().toString());
      }
      return context;

    } catch (Exception e) {
      throw new IllegalStateException("Fail to configure webapp", e);
View Full Code Here

                                if (state == 0) {
                                    // context only initialized
                                    tomcatWebAppBuilder.init(standardContext);
                                } else if (state == 1) {
                                    // context already started
                                    standardContext.addParameter("openejb.start.late", "true");
                                    ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
                                    Thread.currentThread().setContextClassLoader(standardContext.getLoader().getClassLoader());
                                    try {
                                        tomcatWebAppBuilder.init(standardContext);
                                        tomcatWebAppBuilder.beforeStart(standardContext);
View Full Code Here

                contextListener.init(standardContext);
            } else if (Lifecycle.BEFORE_START_EVENT.equals(type)) {
                contextListener.beforeStart(standardContext);
            } else if (Lifecycle.START_EVENT.equals(type)) {
                if (TomcatHelper.isTomcat7()) {
                    standardContext.addParameter("openejb.start.late", "true");
                }

                contextListener.start(standardContext);
            } else if (Lifecycle.AFTER_START_EVENT.equals(type)) {
                contextListener.afterStart(standardContext);
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.