-
1. Re: Session randomly loses user
kragoth Sep 19, 2010 9:15 PM (in response to alain94040)Can we at least get the relevant code sections including what scope you have on your beans etc. When/where is user created. Are new values for user created/set during your nested conversations?
Nested conversations are a funny beast and last time I checked the doco stilled said that they were not a production ready feature. So it could be something funny going on during the context switching and just lucky/unlucky timings are causing a null value to be picked up during the bijection process.
But, a little more info would be helpful.
-
2. Re: Session randomly loses user
lvdberg Sep 20, 2010 5:59 AM (in response to alain94040)Hi,
Code will be very helpful, but as a first guess: do you by any chance outject the user var more than once in you application or have you manually set timeouts for your pages?
I ONLY outject the currentUser directly after authenticating him/her and only
loose
the user (context-var) after an automatic session closure. Under normal conditions the user (and its related organisation) stays available without a problem.Leo
-
3. Re: Session randomly loses user
lceni Jan 26, 2011 9:35 PM (in response to alain94040)I have the same problem, I'm going crazy!
Seems to be magic. As you told, 90% of time works perfectly but then I click in some link or button, the application executes an action and redirect the user to the login page informing that the user isn't logged in.I was suspecting to be something about the Transaction manager then I've used the same configuration found at jpa example project but didn't fix.
The problem is that Seam doesn't inform what happened, even in debug mode. We need to spend a lot of time debugging the framework's classes to try to discover something.
Other day I changed my persistence-context name from
entityManager
toem
and then the application started to throw a misteriously NPE. Trying to figure out what happened, I found here on forum some users w/ the same problem when using a s:convertEntity that internally uses the entityManager reference to get from cache or DB the correct entity being converted.So, my complain is about the seam error messages that makes the framework to be NOT self-explained, different of others that when you get an exception you know exactly where is the error only reading its message.
Lucas
-
4. Re: Session randomly loses user
lvdberg Jan 27, 2011 3:20 AM (in response to alain94040)Hi,
repeating the remark in my previous email. Please send in your code and do some additional debugging.
If you create a session scoped bean, call from the Authentication code (or whatever other bean in your session) you user data, when the session times out the destroy method will be called and the name of the user will be printed. Put some Date-stuff in it and you can see exactly when it happens.so:
So something like:
@Scope(SESSION) public class CheckIt implements Ser...{ @Logger Log log; private User you; public putUserData(User user){ you = user; } @Destroy public whoWsDisConnected(){ log.info("The disconnected user is....." + you.getFullName()); } }
Leo