Package org.apache.geronimo.tomcat.interceptor

Examples of org.apache.geronimo.tomcat.interceptor.BeforeAfter


                }
            }
        }

        int index = 0;
        BeforeAfter interceptor = new InstanceContextBeforeAfter(null,
                index++,
                index++, ctx.getUnshareableResources(),
                ctx.getApplicationManagedSecurityResources(),
                ctx.getTrackedConnectionAssociator());
View Full Code Here


                }
            }
        }

        int index = 0;
        BeforeAfter interceptor = new InstanceContextBeforeAfter(null,
                index++,
                index++, ctx.getUnshareableResources(),
                ctx.getApplicationManagedSecurityResources(),
                ctx.getTrackedConnectionAssociator());
View Full Code Here

        } catch (NamingException ne) {
            log.error(ne);
        }
       
        int index = 0;
        BeforeAfter interceptor = new InstanceContextBeforeAfter(null, index++,
                ctx.getUnshareableResources(),
                ctx.getApplicationManagedSecurityResources(),
                ctx.getTrackedConnectionAssociator());

        // Set ComponentContext BeforeAfter
View Full Code Here

                }
            }
        }

        int index = 0;
        BeforeAfter interceptor = new InstanceContextBeforeAfter(null,
                index++,
                index++, ctx.getUnshareableResources(),
                ctx.getApplicationManagedSecurityResources(),
                ctx.getTrackedConnectionAssociator());
View Full Code Here

        }
    }

    private void beforeDispatch(GeronimoStandardContext webContext, ServletRequest request, ServletResponse response) {

        BeforeAfter beforeAfter = webContext.getBeforeAfter();
        if (beforeAfter != null) {
            Stack<Object[]> stack = (Stack<Object[]>) currentContext.get();
            Object context[] = new Object[webContext.getContextCount() + 1];
            String wrapperName = getWrapperName(request, webContext);
            context[webContext.getContextCount()] = TomcatGeronimoRealm.setRequestWrapperName(wrapperName);

            beforeAfter.before(context, request, response);

            stack.push(context);
        }
    }
View Full Code Here

        }
    }

    private void afterDispatch(GeronimoStandardContext webContext, ServletRequest request, ServletResponse response) {

        BeforeAfter beforeAfter = webContext.getBeforeAfter();
        if (beforeAfter != null) {
            Stack stack = (Stack) currentContext.get();
            Object context[] = (Object[]) stack.pop();

            beforeAfter.after(context, request, response);

            TomcatGeronimoRealm.setRequestWrapperName((String) context[webContext.getContextCount()]);
        }
    }
View Full Code Here

            // ignored
            log.warn("Could not find env in enterprise naming context", e);
        }

        int index = 0;
        BeforeAfter interceptor = new InstanceContextBeforeAfter(null,
                index++,
                index++, ctx.getUnshareableResources(),
                ctx.getApplicationManagedSecurityResources(),
                ctx.getTrackedConnectionAssociator());
View Full Code Here

                configurationFactory = tctx.getSecurityHolder().getConfigurationFactory();
            }
        }

        int index = 0;
        BeforeAfter interceptor = new InstanceContextBeforeAfter(null,
                index++,
                index++, ctx.getUnshareableResources(),
                ctx.getApplicationManagedSecurityResources(),
                ctx.getTrackedConnectionAssociator());
View Full Code Here

        }
    }

    private void beforeDispatch(GeronimoStandardContext webContext, ServletRequest request, ServletResponse response) {

        BeforeAfter beforeAfter = webContext.getBeforeAfter();
        if (beforeAfter != null) {
            Stack<BeforeAfterContext> stack = currentContext.get();

            BeforeAfterContext beforeAfterContext = new BeforeAfterContext(webContext.getContextCount() + 2);

            String wrapperName = getWrapperName(request, webContext);
            beforeAfterContext.contexts[webContext.getContextCount()] = JACCRealm.setRequestWrapperName(wrapperName);

            beforeAfterContext.contexts[webContext.getContextCount() + 1] = PolicyContext.getContextID();
            PolicyContext.setContextID(webContext.getPolicyContextId());

            beforeAfter.before(beforeAfterContext, request, response, BeforeAfter.DISPATCHED);

            stack.push(beforeAfterContext);
        }
    }
View Full Code Here

        }
    }

    private void afterDispatch(GeronimoStandardContext webContext, ServletRequest request, ServletResponse response) {

        BeforeAfter beforeAfter = webContext.getBeforeAfter();
        if (beforeAfter != null) {
            Stack<BeforeAfterContext> stack = currentContext.get();
            BeforeAfterContext beforeAfterContext = stack.pop();

            beforeAfter.after(beforeAfterContext, request, response, BeforeAfter.DISPATCHED);

            JACCRealm.setRequestWrapperName((String) beforeAfterContext.contexts[webContext.getContextCount()]);
            PolicyContext.setContextID((String) beforeAfterContext.contexts[webContext.getContextCount() + 1]);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.tomcat.interceptor.BeforeAfter

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.