Package org.apache.catalina.core

Examples of org.apache.catalina.core.ApplicationContext$PrivilegedLogMessage


    RedisSessionManager sessionManager = null;
    ApplicationContextFacade appContextFacadeObj = (ApplicationContextFacade)request.session().raw().getServletContext();
    try {
      Field applicationContextField = appContextFacadeObj.getClass().getDeclaredField("context");
      applicationContextField.setAccessible(true);
      ApplicationContext appContextObj = (ApplicationContext)applicationContextField.get(appContextFacadeObj);
      Field standardContextField = appContextObj.getClass().getDeclaredField("context");
      standardContextField.setAccessible(true);
      StandardContext standardContextObj = (StandardContext)standardContextField.get(appContextObj);
      sessionManager = (RedisSessionManager)standardContextObj.getManager();
    } catch (Exception e) { }
    return sessionManager;
View Full Code Here


                passedClasses.add(TomEEMyFacesContainerInitializer.class);
            }

            if (ctx instanceof ApplicationContextFacade) {
                try {
                    final ApplicationContext appCtx = (ApplicationContext) get(ApplicationContextFacade.class, ctx);
                    final Context tomcatCtx = (Context) get(ApplicationContext.class, appCtx);
                    if (!Arrays.asList(tomcatCtx.findApplicationListeners()).contains(StartupServletContextListener.class.getName())) {
                        addListener(ctx);
                    }
                } catch (final Exception e) {
View Full Code Here

    }

    private boolean isFacesServletPresent(final ServletContext ctx) {
        if (ctx instanceof ApplicationContextFacade) {
            try {
                final ApplicationContext appCtx = (ApplicationContext) get(ApplicationContextFacade.class, ctx);
                final Context tomcatCtx = (Context) get(ApplicationContext.class, appCtx);
                if (tomcatCtx instanceof StandardContext) {
                    final Container[] servlets = tomcatCtx.findChildren();
                    if (servlets != null) {
                        for (final Container s : servlets) {
View Full Code Here

    private static StandardContext getStandardContext(ServletContext context) {
        try {
            // Hack into Tomcat to replace the InstanceManager using
            // reflection to access private fields
            ApplicationContext appContext = (ApplicationContext) getContextFieldValue((ApplicationContextFacade) context, ApplicationContextFacade.class);
            return (StandardContext) getContextFieldValue(appContext, ApplicationContext.class);
        } catch (Exception e) {
            throw TomcatLogger.LOG.cannotGetStandardContext(e);
        }
    }
View Full Code Here

                passedClasses.add(TomEEMyFacesContainerInitializer.class);
            }

            if (ctx instanceof ApplicationContextFacade) {
                try {
                    final ApplicationContext appCtx = (ApplicationContext) get(ApplicationContextFacade.class, ctx);
                    final Context tomcatCtx = (Context) get(ApplicationContext.class, appCtx);
                    if (!Arrays.asList(tomcatCtx.findApplicationListeners()).contains(StartupServletContextListener.class.getName())) {
                        addListener(ctx);
                    }
                } catch (final Exception e) {
View Full Code Here

    }

    private boolean isFacesServletPresent(final ServletContext ctx) {
        if (ctx instanceof ApplicationContextFacade) {
            try {
                final ApplicationContext appCtx = (ApplicationContext) get(ApplicationContextFacade.class, ctx);
                final Context tomcatCtx = (Context) get(ApplicationContext.class, appCtx);
                if (tomcatCtx instanceof StandardContext) {
                    final Container[] servlets = tomcatCtx.findChildren();
                    if (servlets != null) {
                        for (final Container s : servlets) {
View Full Code Here

                passedClasses.add(TomEEMyFacesContainerInitializer.class);
            }

            if (ctx instanceof ApplicationContextFacade) {
                try {
                    final ApplicationContext appCtx = (ApplicationContext) get(ApplicationContextFacade.class, ctx);
                    final Context tomcatCtx = (Context) get(ApplicationContext.class, appCtx);
                    if (!Arrays.asList(tomcatCtx.findApplicationListeners()).contains(StartupServletContextListener.class.getName())) {
                        addListener(ctx);
                    }
                } catch (Exception e) {
View Full Code Here

    }

    private boolean isFacesServletPresent(final ServletContext ctx) {
        if (ctx instanceof ApplicationContextFacade) {
            try {
                final ApplicationContext appCtx = (ApplicationContext) get(ApplicationContextFacade.class, ctx);
                final Context tomcatCtx = (Context) get(ApplicationContext.class, appCtx);
                if (tomcatCtx instanceof StandardContext) {
                    final Container[] servlets = tomcatCtx.findChildren();
                    if (servlets != null) {
                        for (Container s : servlets) {
View Full Code Here

    private synchronized Wrapper registerInternal(String alias, Servlet servlet, Dictionary initparams, HttpContext httpContext, Type type) throws NamespaceException {
        File storageDir = new File(serverEnvironment.getServerTempDir() + File.separator + alias + File.separator + "osgiservlet-root");
        storageDir.mkdirs();

        ShareableContext ctx;
        ApplicationContext actx = null;
        if (httpContext != null) {
            actx = contexts.get(httpContext);
            ctx = new ShareableContext(actx);
        } else {
            ctx = new ShareableContext(null);
View Full Code Here

                passedClasses.add(TomEEMyFacesContainerInitializer.class);
            }

            if (ctx instanceof ApplicationContextFacade) {
                try {
                    final ApplicationContext appCtx = (ApplicationContext) get(ApplicationContextFacade.class, ctx);
                    final Context tomcatCtx = (Context) get(ApplicationContext.class, appCtx);
                    if (!Arrays.asList(tomcatCtx.findApplicationListeners()).contains(StartupServletContextListener.class.getName())) {
                        addListener(ctx);
                    }
                } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.catalina.core.ApplicationContext$PrivilegedLogMessage

Copyright © 2018 www.massapicom. 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.