Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
+1
person also asked this
people also asked this
Replies
19 replies
Subscribers
7 subscribers
Views
16895 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Is there any way to get the list of currently logged in users in the system? Log
Mahesh Sanga
over 9 years ago
Is there any way to get the list of currently logged in users in the system? Login information parser plugin is not useful as the login-audit.csv file does not have the log-out status. Can we build a servlet filter plugin to achive this? or can we use JBoss to track the open sessions? any ideas?...
OriginalPostID-113347
OriginalPostID-113347
Discussion posts and replies are publicly visible
Parents
0
riteshp
over 9 years ago
Quick dirty solution (or may be not) -> Go back to java -> write a Session Listener like below:
public void sessionCreated(HttpSessionEvent se) {
//Creating new session...
activeSessions += 1;
SessionCounterDao.getInstance().pushActiveSessionToDB(se.getSession());
System.out.println("New session Created..." + se.getSession().getId());
}
public void sessionDestroyed(HttpSessionEvent se) {
System.out.print("Destroying... " + se.getSession().getId());
SessionCounterDao.getInstance().popDestroyedSessionFromDB(se.getSession());
if (activeSessions > 0) {
activeSessions -= 1;
}
System.out.println(" --> Destroyed");
}
You have now SPRING_SECURITY_CONTEXT there
String springSecContext = (String)session.getAttribute("SPRING_SECURITY_CONTEXT"); /* geeting all sesision info here */
Enjoy!!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
riteshp
over 9 years ago
Quick dirty solution (or may be not) -> Go back to java -> write a Session Listener like below:
public void sessionCreated(HttpSessionEvent se) {
//Creating new session...
activeSessions += 1;
SessionCounterDao.getInstance().pushActiveSessionToDB(se.getSession());
System.out.println("New session Created..." + se.getSession().getId());
}
public void sessionDestroyed(HttpSessionEvent se) {
System.out.print("Destroying... " + se.getSession().getId());
SessionCounterDao.getInstance().popDestroyedSessionFromDB(se.getSession());
if (activeSessions > 0) {
activeSessions -= 1;
}
System.out.println(" --> Destroyed");
}
You have now SPRING_SECURITY_CONTEXT there
String springSecContext = (String)session.getAttribute("SPRING_SECURITY_CONTEXT"); /* geeting all sesision info here */
Enjoy!!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data