posted 12 years ago
Hi there,
i have the following issue. When two users access concurrently my application, the managed beans seem to lose their state. I thought this was due to re-initialization of the session managedbeans. So I struggled for a long time to find out for which reason those beans were being reset, and finally found out the problem, the users, although sitting on different computers, are actually sharing the same session id!. So the beans are not being reset automatically, but instead as a result of the application logic itself (when starting a process, I previously set the managedbean's members state to null in order to cleanup resources and prevent malfunction). I found it out by checking the session id value inside a custom PhaseListener, and saw that the two users shared the session object.
So now, on one hand I know what the problem is, but on the other, don't know what actually makes the server manage the creation of a new session. I was 100% sure of the fact that the server would check the origin of requests, and when detecting a new one when comparing with the existing connections, it would create a new session object and bind it to that origin (i.e. IP address?).
So I see myself now involved with the task of manually managing creation and destruction of sessions. And I don't know exactly where to start.
Regarding the problem, does anyone know of a straight solution to the problem? Should I set something in any of the *.xml config files?
Many thanks in advance for your insights.
Carlos.