Examples of Callers


Examples of org.apache.geronimo.security.Callers

        //TODO reorganize this so it makes more sense.  maybe use an interceptor stack.
        //TODO track resource ref shared and app managed security
        Thread thread = Thread.currentThread();

        ClassLoader oldClassLoader = thread.getContextClassLoader();
        Callers oldCallers = ContextManager.getCallers();
        Subject clientSubject = defaultSubject;
        try {
            thread.setContextClassLoader(classLoader);
            jndiContext.startClient(appClientModuleName, kernel, classLoader);
            Context componentContext = jndiContext.getJndiContext();
View Full Code Here

Examples of org.apache.geronimo.security.Callers

    public DefaultSubjectValve(Subject defaultSubject) {
        this.defaultSubject = defaultSubject;
    }

    public void invoke(Request request, Response response) throws IOException, ServletException {
        Callers oldCallers = null;
        boolean setSubject = false;
        if (defaultSubject != null) {
            oldCallers = ContextManager.getCallers();
            setSubject = oldCallers == null || oldCallers.getCurrentCaller() == null;
        }
        if (setSubject) {
            ContextManager.setCallers(defaultSubject, defaultSubject);
            try {
                getNext().invoke(request, response);
View Full Code Here

Examples of org.apache.geronimo.security.Callers

        setCurrentServletName(getName());
        try {
            if (runAsSubject == null) {
                super.handle(request, response);
            } else {
                Callers oldCallers = ContextManager.pushNextCaller(runAsSubject);
                try {
                    super.handle(request, response);
                } finally {
                    ContextManager.popCallers(oldCallers);
                }
View Full Code Here

Examples of org.apache.geronimo.security.Callers

     */
    public void handle(String target, HttpServletRequest request,
            HttpServletResponse response, int dispatch) throws IOException,
            ServletException {
        String old_policy_id = PolicyContext.getContextID();
        Callers oldCallers = ContextManager.getCallers();

        try {
            PolicyContext.setContextID(policyContextID);
            PolicyContext.setHandlerData(request);

View Full Code Here

Examples of org.apache.geronimo.security.Callers

        //TODO reorganize this so it makes more sense.  maybe use an interceptor stack.
        //TODO track resource ref shared and app managed security
        Thread thread = Thread.currentThread();

        ClassLoader oldClassLoader = thread.getContextClassLoader();
        Callers oldCallers = ContextManager.getCallers();
        Subject clientSubject = defaultSubject;
        try {
            thread.setContextClassLoader(classLoader);
            jndiContext.startClient(appClientModuleName, kernel, classLoader);
            Context componentContext = jndiContext.getJndiContext();
View Full Code Here

Examples of org.apache.geronimo.security.Callers

    public void init() {
        System.out.println("Test Servlet init");
    }

    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        Callers callers = ContextManager.getCallers();
        Subject current = callers.getCurrentCaller();
        Subject next = callers.getNextCaller();
        PrintWriter out = response.getWriter();
        out.println("Current subject: " + current);
        out.println("Next subject:    " + next);
        //this should create the database
        if (csds == null) {
View Full Code Here

Examples of org.apache.geronimo.security.Callers

@version $Rev: 799120 $ $Date: 2009-07-29 19:23:25 -0400 (Wed, 29 Jul 2009) $
*/
public class ThreadCleanerValve extends ValveBase {

    public void invoke(Request request, Response response) throws IOException, ServletException {
        Callers oldCallers = ContextManager.getCallers();
        try {
            getNext().invoke(request, response);
        } finally {
            ContextManager.popCallers(oldCallers);
        }
View Full Code Here

Examples of org.apache.geronimo.security.Callers

     */
    public void handle(String target, HttpServletRequest request,
            HttpServletResponse response, int dispatch) throws IOException,
            ServletException {
        String old_policy_id = PolicyContext.getContextID();
        Callers oldCallers = ContextManager.getCallers();

        try {
            PolicyContext.setContextID(policyContextID);
            PolicyContext.setHandlerData(request);

View Full Code Here

Examples of org.apache.geronimo.security.Callers

        setCurrentServletName(getName());
        try {
            if (runAsSubject == null) {
                super.handle(request, response);
            } else {
                Callers oldCallers = ContextManager.pushNextCaller(runAsSubject);
                try {
                    super.handle(request, response);
                } finally {
                    ContextManager.popCallers(oldCallers);
                }
View Full Code Here

Examples of org.apache.geronimo.security.Callers

        //TODO reorganize this so it makes more sense.  maybe use an interceptor stack.
        //TODO track resource ref shared and app managed security
        Thread thread = Thread.currentThread();

        ClassLoader oldClassLoader = thread.getContextClassLoader();
        Callers oldCallers = ContextManager.getCallers();
        Subject clientSubject = defaultSubject;
        try {
            thread.setContextClassLoader(classLoader);
            jndiContext.startClient(appClientModuleName, kernel, classLoader);
            Context componentContext = jndiContext.getJndiContext();
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.