You might want to use something like this:
//<String,Visit> is the sessionid and the Visit Object
private static ConcurrentHashMap<String,Visit> visitHistory_ = new
ConcurrentHashMap<String,Visit>();
and implement it as a singleton with synchronized accessor methods.
Glen Vermeylen wrote:
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
>
> 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 your logic provide the necessary
synchronization for insertions, deletions, *and* retrievals? If not,
switching to a HashTable might resolve your problem.
Or then again, it might just be a bug, but you didn't tell us the
version of Tomcat you're using, so searching bugzilla would be rather
tedious.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Peter Stavrinides
Albourne Partners (Cyprus) Ltd
Tel: +357 22 750652
If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]