0
How can I make only one http session is open per user on the system.
Main technologies in the project:
- Spring 4
- JSF 2.2
- Hibernate 5
Example: The user Juca, works on your computer using 3 browser. (I.e, Firefox and Chrome)
- If it logs with the 3 at the same time within 1 minute
- The session is 1 hour
- Juca left for a meeting
- I’ll have 3 sessions for Juuca during a 1 without doing anything.
Or the 2 wasted (it can work only is a browser, this is system requirement)
I am trying to use Httpsessionlistener, to control and invalidate first after the second session.
- In other words, you must remain the last one logged in.
But I’m not seeing an easy way to do that. (How to recover the previous session itself has no relationship)
Someone has a clearer concept that will solve this?
I posted the issue in stackoverflow in English here and found the solution here
– Marcelo Ferreira
Solution in the answer that public class User Implements Httpsessionbindinglistener
– Marcelo Ferreira