[jboss-user] [EJB 3.0] - Timers in stateful session bean?
kstrunk
do-not-reply at jboss.com
Sun Dec 10 14:21:26 EST 2006
Hi!
I'm writing a polling html chat for my web project. After login a contact list is display to the user which shows which users are also online. This list is refreshed using Ajax every x seconds. For that the users online state is stored in database using an entity bean.
But how to keep the users online state up-to-date? When a user logs out normally he will be set to offline. But what should I do if the user just closes his browser? Is there a way to get an event if a user has not refreshed his buddy list for a long time (> 2x seconds)? For me this looks like a timer which is reset every time the user refreshed his contact list? But as far as I know timers aren't allowed in stateful session bean, are they? Or does anyone has a better idea how to handle this approch?
I'm using EJB3 with JBoss 4.0.5
Best regards,
Strunker
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992565#3992565
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992565
More information about the jboss-user
mailing list