Package javax.portlet

Examples of javax.portlet.PortletSession.invalidate()


    public void testInvalidate()
    {
        PortletSession session = newSession();

        session.invalidate();

        replayControls();

        WebSession ws = new PortletWebSession(session);
View Full Code Here


           
            for (final Map.Entry<String, PortletSession> portletSessionEntry: portletSessions.entrySet()) {
                final String contextPath = portletSessionEntry.getKey();
                final PortletSession portletSession = portletSessionEntry.getValue();
                try {
                    portletSession.invalidate();
                }
                catch (IllegalStateException e) {
                    this.logger.info("PortletSession with id '" + portletSession.getId() + "' for context '" + contextPath + "' has already been invalidated.");
                }
                catch (Exception e) {
View Full Code Here

  }

  public void invalidateSession() {
    PortletSession portletSession = request.getPortletSession(false);
    if (portletSession != null) {
      portletSession.invalidate();
    }
  }

  public void setSessionMaxInactiveInterval(int interval) {
    request.getPortletSession().setMaxInactiveInterval(interval);
View Full Code Here

    public void testInvalidate()
    {
        PortletSession session = newSession();

        session.invalidate();

        replay();

        WebSession ws = new PortletWebSession(session);
View Full Code Here

        for (final Map.Entry<String, PortletSession> portletSessionEntry: portletSessions.entrySet()) {
            final String contextPath = portletSessionEntry.getKey();
            final PortletSession portletSession = portletSessionEntry.getValue();
            try {
                portletSession.invalidate();
            }
            catch (IllegalStateException e) {
                this.logger.info("PortletSession with id '" + portletSession.getId() + "' for context '" + contextPath + "' has already been invalidated.");
            }
            catch (Exception e) {
View Full Code Here

            catch (IllegalArgumentException expected)
            {
            }


            session.invalidate();

            //After invalidate
            try
            {
               session.getAttribute("name");
View Full Code Here

            PortletSession session = request.getPortletSession();

            //before invalidate
            session.getCreationTime();

            session.invalidate();

            //after invalidate
            try
            {
               session.getCreationTime();
View Full Code Here

      {
         protected Response run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
         {
            PortletSession session = request.getPortletSession();

            session.invalidate();

            //one more...
            try
            {
               session.invalidate();
View Full Code Here

            session.invalidate();

            //one more...
            try
            {
               session.invalidate();
               fail();
            }
            catch (IllegalStateException expected)
            {
            }
View Full Code Here

               assertEquals(HttpSessionEvents.Event.CREATED, createdEvent.getType());
               HttpSessionEvents.desactivate();

               //
               HttpSessionEvents.activate();
               session.invalidate();
               events = HttpSessionEvents.getEvents();
               assertEquals(1, events.size());
               HttpSessionEvents.Event destroyedEvent = (HttpSessionEvents.Event)events.get(0);
               assertEquals(sessionId, destroyedEvent.getSessionId());
               assertEquals(HttpSessionEvents.Event.DESTROYED, destroyedEvent.getType());
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.