[jboss-user] [JBoss Seam] - Re: Bug? Seam-2.0-Beta - HttpSession Creation

PatrickMadden do-not-reply at jboss.com
Wed Jun 27 02:02:51 EDT 2007


Hi,

I have a workaround for this but I can't imagine that its something you all will be happy with.

For the sessionCreated and sessionDestroyed methods I simply put them in a runnable and called them later.

It appears that as soon as I call HttpSessionEvent.getSession() is when the recursive loop occurrs.

Anyway here is my workaround for now:


  |     public void sessionCreated(final HttpSessionEvent evt)
  |     {
  |         Runnable runner = new Runnable()
  |         {
  |             public void run()
  |             {
  |                 XSystem.logInfo("Session Created = " + evt.getSession().getId());
  |                 IdToSessionMap.getInstance().addHttpSession(evt.getSession());
  |                 SessionController.getInstance(evt.getSession().getId());                 
  |             }
  |         };
  |         
  |         EventQueue.invokeLater(runner);
  |       
  |     }
  | 
  |     public void sessionDestroyed(final HttpSessionEvent evt)
  |     {
  |         Runnable runner = new Runnable()
  |         {
  |             public void run()
  |             {        
  |                 XSystem.logInfo("Session Destroyed = " + evt.getSession().getId());
  |                 IdToSessionMap.getInstance().removeHttpSession(evt.getSession());
  |                 SessionController.freeInstance(evt.getSession().getId());
  |             }
  |         };
  |         
  |         EventQueue.invokeLater(runner);
  |     }
  | 

Looking forward to know whether or not I'm crazy :)

Thanks,

PVM

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057957#4057957

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057957



More information about the jboss-user mailing list