0 Replies Latest reply on Jan 27, 2009 1:13 PM by Gavrilov Victor

    HttpSession question at Seam 2.1 + JSF (MyFaces)

    Gavrilov Victor Newbie

      Hi, everybody.


      I have an application running on Seam 2.1 and JSF (MyFaces). There's a requirement to create the HttpSession as late as possible, but currently we see that HttpSession is created at the very beginning of the application start.
      As I've found from the perusing the trace which I can see from debug purpose session listener (below) and from some books, the Seam creates HttpSession no matter of the developers' needs. Is that really so? If not what may be the reason of this session creation? I've already tried to remove all the beans except for PAGE scope and got no result.
      The piece of stack trace is below



      Session created
           at de.jamba.hippo.SessionListener.sessionCreated(SessionListener.java:18)
           at org.apache.catalina.session.StandardSession.tellNew(StandardSession.java:397)
           at org.apache.catalina.session.StandardSession.setId(StandardSession.java:369)
           at org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:827)
           at org.apache.catalina.session.StandardManager.createSession(StandardManager.java:291)
           at org.apache.catalina.connector.Request.doGetSession(Request.java:2295)
           at org.apache.catalina.connector.Request.getSession(Request.java:2066)
           at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
           at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
           at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:545)
           at org.apache.myfaces.context.servlet.SessionMap.setAttribute(SessionMap.java:53)
           at org.apache.myfaces.util.AbstractAttributeMap.put(AbstractAttributeMap.java:103)
           at org.apache.myfaces.util.AbstractAttributeMap.put(AbstractAttributeMap.java:35)
           at org.jboss.seam.contexts.BasicContext.set(BasicContext.java:80)
           at org.jboss.seam.Component.newInstance(Component.java:1974)
           at org.jboss.seam.Component.getInstance(Component.java:1876)
           at org.jboss.seam.Component.getInstance(Component.java:1855)
           at org.jboss.seam.Component.getInstance(Component.java:1832)
           at org.jboss.seam.web.Session.getInstance(Session.java:122)
           at org.jboss.seam.contexts.FacesLifecycle.beginRequest(FacesLifecycle.java:54)
           at org.jboss.seam.jsf.SeamPhaseListener.beforeRestoreView(SeamPhaseListener.java:377)
           at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:137)
           at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
           at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:73)
           at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:93)
           at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)



      Thanks in advance for any help.