[webbeans-dev] maybe delay httpSession creation until needed?

Matt Drees matt.drees at gmail.com
Sun Dec 28 16:43:49 EST 2008


Hey guys,

I noticed that webbeans is currently creating the HttpSession immediately at
the beginning of the request:

   public static void beginRequest(HttpServletRequest request)
   {
      SessionContext.INSTANCE.setBeanMap(new
SessionBeanMap(request.getSession()));
      ...
   }


Do you think it'd be worthwhile delaying session creation until it's
actually needed (i.e. when a session-scoped bean is first created)?  Some
people may wish to avoid creating a session until a user logs in, for
example.
I don't know how many people actually do this.

For what it's worth, Seam tries to create sessions lazily, so it'd probably
be good to follow suit.

-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20081228/7fefcd53/attachment.html 


More information about the weld-dev mailing list