You might want to use something like this:
// is the sessionid and the Visit Object
private static ConcurrentHashMap visitHistory_ = new
ConcurrentHashMap();
and implement it as a singleton with synchronized accessor methods.
Glen Vermeylen wrote:
We use Tomcat 5.5.20.
I actually
Thanks for the idea, putting a sessionbindinglistener on the session each
time a user logs on is a much cleaner approach.
Locally it seems to work nicely and I can delete the sessionlistener from
web.xml.
2007/3/8, albrecht andrzejewski <[EMAIL PROTECTED]>:
I actually track my connected users w
I actually track my connected users with this code:
public class MySessionManager{
public static Set connecteds;
/** Creates a new instance of MySessionManager */
public MySessionManager() {
connecteds = new java.util.HashSet();
and i use this method to add an entry for
We use Tomcat 5.5.20.
I actually have no synchronization in place whatsoever. I will change to
hashtable and see if it solves the problem.
Thank you.
2007/3/7, Caldarale, Charles R <[EMAIL PROTECTED]>:
> From: Glen Vermeylen [mailto:[EMAIL PROTECTED]
> Subject: Retrieve list of all sessions
>
> From: Glen Vermeylen [mailto:[EMAIL PROTECTED]
> Subject: Retrieve list of all sessions
>
> I've created a management screen which lists all currently
> logged in users. This list is kept as a hashmap and is kept
> "in sync" with reality in the following way:
A HashMap is unsynchronized; does