tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Einfeldt" <ralph.einfe...@uptime-isc.de>
Subject RE: HttpSessionListener: Negative session count
Date Tue, 12 Aug 2003 08:47:03 GMT
in this case 

synchronized public void sessionCreated(
synchronized public void sessionDestroyed(

should be OK.

> -----Original Message-----
> From: Christian Hauser [mailto:c.hauser@active.ch]
> Sent: Tuesday, August 12, 2003 10:44 AM
> To: Tomcat Users List
> Subject: Re: HttpSessionListener: Negative session count
> 
> 
>    public void sessionCreated(HttpSessionEvent event) {
>      synchronized (this) {
>        activeSessions++;
>      }
>    }
> 
>    public void sessionDestroyed(HttpSessionEvent event) {
>      synchronized (this) {
>        if (activeSessions > 0) {
>          activeSessions--;
>        }
>      }
>    }
> 

Mime
View raw message