I would like to record user log-in and log-out activity of user sessions to DB in ADF application. Planning to implement through HttpSessionListener. However, the sessionCreated() and sessionDestroyed() method gets called multiple times.
Please let me know if this the right place to implement.
dependent on how you access the database (e.g. JDBC Datasource) you don't have a permanent connection (and chances are good you use shared connection) so that you need to make the loggin part of the application. A suggestion is to use a session bean and as soon as a user starts working in an application you perform the log and then set a flag. More problematic is the logout if the user doesn't quit the application properly but closes the browser