Examples of BeforeAfterContext


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

    public void instanceEvent(InstanceEvent event) {

        if (event.getType().equals(InstanceEvent.BEFORE_SERVICE_EVENT)) {
            String oldWrapperName = JACCRealm.setRequestWrapperName(event.getWrapper().getName());

            BeforeAfterContext beforeAfterContext = new BeforeAfterContext(1);
            beforeAfterContext.contexts[0] = oldWrapperName;

            currentContext.get().push(beforeAfterContext);
        }
View Full Code Here

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

        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();
View Full Code Here

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

    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

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

        this.beforeAfter = beforeAfter;
        this.contextIndexCount = contextIndexCount;
    }

    public void invoke(Request request, Response response) throws IOException, ServletException {
        BeforeAfterContext beforeAfterContext = new BeforeAfterContext(contextIndexCount);

        if (beforeAfter != null){
            beforeAfter.before(beforeAfterContext, request, response, BeforeAfter.EDGE_SERVLET);
        }
        try {
View Full Code Here

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

    /* This method is called by a background thread to destroy sessions (among other things)
     * so we need to apply appropriate context to the thread to expose JNDI, etc.
     */
    @Override
    public void backgroundProcess() {
        BeforeAfterContext beforeAfterContext = null;

        if (beforeAfter != null){
            beforeAfterContext = new BeforeAfterContext(contextCount);
            beforeAfter.before(beforeAfterContext, null, null, BeforeAfter.EDGE_SERVLET);
        }

        try {
            super.backgroundProcess();
View Full Code Here

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

    public void kill() throws Exception {
        if (serviceRegistration != null) {
            serviceRegistration.unregister();
        }

        BeforeAfterContext beforeAfterContext = null;

        if (beforeAfter != null){
            beforeAfterContext = new BeforeAfterContext(contextCount);
            beforeAfter.before(beforeAfterContext, null, null, BeforeAfter.EDGE_SERVLET);
        }

        try {
            stop();
View Full Code Here

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

    }

    @Override
    protected ClassLoader bindThread() {
        ClassLoader oldClassLoader =  super.bindThread();
        BeforeAfterContext beforeAfterContext = null;

        if (beforeAfter != null){
            beforeAfterContext = new BeforeAfterContext(contextCount);
            beforeAfter.before(beforeAfterContext, null, null, BeforeAfter.EDGE_SERVLET);
            //beforeAfterContext is pushed the stack only if every BeforeAfter element works fine
            beforeAfterContexts.get().push(beforeAfterContext);
        }
        return oldClassLoader;
View Full Code Here

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

    /* This method is called by a background thread to destroy sessions (among other things)
     * so we need to apply appropriate context to the thread to expose JNDI, etc.
     */
    @Override
    public void backgroundProcess() {
        BeforeAfterContext beforeAfterContext = null;
        if (beforeAfter != null) {
            beforeAfterContext = new BeforeAfterContext(contextCount);
            beforeAfter.before(beforeAfterContext, null, null, BeforeAfter.EDGE_SERVLET);
        }
        try {
            super.backgroundProcess();
        } finally {
View Full Code Here

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

    public void kill() throws Exception {
        if (serviceRegistration != null) {
            serviceRegistration.unregister();
        }
        BeforeAfterContext beforeAfterContext = null;
        if (beforeAfter != null) {
            beforeAfterContext = new BeforeAfterContext(contextCount);
            beforeAfter.before(beforeAfterContext, null, null, BeforeAfter.EDGE_SERVLET);
        }
        try {
            stop();
            destroy();
View Full Code Here

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

    }

    @Override
    protected ClassLoader bindThread() {
        ClassLoader oldClassLoader = super.bindThread();
        BeforeAfterContext beforeAfterContext = null;
        if (beforeAfter != null) {
            beforeAfterContext = new BeforeAfterContext(contextCount);
            beforeAfter.before(beforeAfterContext, null, null, BeforeAfter.EDGE_SERVLET);
            //beforeAfterContext is pushed the stack only if every BeforeAfter element works fine
            beforeAfterContexts.get().push(beforeAfterContext);
        }
        return oldClassLoader;
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.