Package org.apache.catalina

Examples of org.apache.catalina.Manager


    }

    private Session createAndUseSession(DistributableSessionManager<?> manager, String id, boolean canCreate, boolean access)
            throws Exception {
        // Shift to Manager interface when we simulate Tomcat
        Manager mgr = manager;
        Session sess = mgr.findSession(id);
        assertNull("session does not exist", sess);
        try {
            sess = mgr.createSession(id, new Random());
            if (!canCreate)
                fail("Could not create session" + id);
        } catch (IllegalStateException ise) {
            if (canCreate) {
                log.error("Failed to create session " + id, ise);
View Full Code Here


               SecurityAssociationActions.pushRunAsIdentity(runAsIdentity);
            }
            userPrincipal.set(caller);

            // If there is a session, get the tomcat session for the principal
            Manager manager = container.getManager();
            if (manager != null && hsession != null)
            {
               try
               {
                  session = manager.findSession(hsession.getId());
               }
               catch (IOException ignore)
               {
               }
            }
View Full Code Here

               SecurityAssociationActions.pushRunAsIdentity(runAsIdentity);
            }
            userPrincipal.set(caller);
           
            // If there is a session, get the tomcat session for the principal
            Manager manager = container.getManager();
            if (manager != null && hsession != null)
            {
               try
               {
                  session = manager.findSession(hsession.getId());
               }
               catch (IOException ignore)
               {
               }
            }
View Full Code Here

    private Session createAndUseSession(DistributableSessionManager<?> manager, String id, boolean canCreate, boolean access)
            throws Exception {
       
        // Shift to Manager interface when we simulate Tomcat
        Manager mgr = manager;
        Session sess = mgr.findSession(id);
        assertNull("session does not exist", sess);
        try {
            sess = mgr.createSession(id, new Random());
            if (!canCreate)
                fail("Could not create session" + id);
        } catch (IllegalStateException ise) {
            if (canCreate) {
                ise.printStackTrace(System.err);
View Full Code Here

        return sess;
    }

    private void useSession(DistributableSessionManager<?> manager, String id) throws Exception {
        // Shift to Manager interface when we simulate Tomcat
        Manager mgr = manager;
        Session sess = mgr.findSession(id);
        assertNotNull("session exists", sess);

        sess.access();
        sess.getSession().setAttribute("test", "test");
View Full Code Here

    }

    @Override
    protected Session doGetSession(boolean create) {
        if (session == null) {
            Manager manager = getContext().getManager();
            if (requestedSessionId != null) {
                try {
                    session = manager.findSession(requestedSessionId);
                } catch (IOException e) {
                    session = null;
                }
            }

            if (session == null && create) {
                session = manager.createSession(requestedSessionId, new Random());
            }

            if (session != null) {
                session.access();
            }
View Full Code Here

   private boolean isManagerStopped(Session session)
   {
      boolean stopped = false;
     
      Manager manager = session.getManager();
     
      if (manager instanceof ManagerBase)
      {
         ObjectName mgrName = ((ManagerBase)manager).getObjectName();
         stopped = (!activeManagers.contains(mgrName));
View Full Code Here

      }

      // If we made a change, track the manager and notify any cluster
      if (added)
      {
         Manager manager = session.getManager();
        
         // Prefer to cache an ObjectName to avoid risk of leaking a manager,
         // so if the manager exposes one, use it
         Object mgrKey = null;
         if (manager instanceof ManagerBase)
View Full Code Here

            reverse.put(session, ssoId);
        }

        // If we made a change, track the manager and notify any cluster
        if (added) {
            Manager manager = session.getManager();

            if (activeManagers.add(manager)) {
                ((Lifecycle) manager).addLifecycleListener(this);
            }
View Full Code Here

               
                // Notify our interested LifecycleListeners
                lifecycle.fireLifecycleEvent(START_EVENT, null);
               
                // Acquire clustered manager
                Manager contextManager = null;
                if (manager == null) {
                    if ( (getCluster() != null) && distributable) {
                        try {
                            contextManager = getCluster().createManager(getName());
                        } catch (Exception ex) {
View Full Code Here

TOP

Related Classes of org.apache.catalina.Manager

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.