tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhijat Thakur" <atha...@bdnacorp.com>
Subject RE: handle to all active sessions in Tomcat
Date Wed, 07 May 2003 21:03:00 GMT
Hi,

I implemented the underlying class and when a servlet in which the session is created is called
the valueBound method of SessionObject is never called. All i did was just implement this
class. Do i have to register the event handler class SessionObject as a listener. What am
i missing? 

thanks

abhijat

-----Original Message-----
From: mike jackson [mailto:mjackson@cdi-hq.com]
Sent: Friday, May 02, 2003 4:31 PM
To: 'Tomcat Users List'
Subject: RE: handle to all active sessions in Tomcat


Something like this, however you'll have to implement the singleton list
yourself.

public class SessionObject implements HttpSessionBindingListener {

	protected HttpSession s;

	public SessionObject( HttpSession s ) {
		this.s = s;
	}

	/**
	 * implementation of interface method
	 */
	public void valueBound( HttpSessionBindingEvent e ) {
		// register with singleton session list
	}

	/**
	 * implementation of interface method
	 */
	public void valueUnbound( HttpSessionBindingEvent e ) {
		// deregister with singleton session list	
	}	
	
	public HttpSession getSession () {
	    return s;
	}
}


--mikej
-=------
mike jackson
mjackson@cdi-hq.com

> -----Original Message-----
> From: Abhijat Thakur [mailto:athakur@bdnacorp.com]
> Sent: Friday, May 02, 2003 3:08 PM
> To: tomcat-user@jakarta.apache.org
> Subject: handle to all active sessions in Tomcat
> 
> Hi,
> 
> I am using Tomcat as my web server and servlet engine. For a
parcticular
> case i need to get hold of all my sessions and invalidate them. I
could
> not find an API through which i could get a handle to all the active
> sessions on Tomcat. How can i get a handle to all the active sessions
on
> Tomcat.
> 
> thanks
> 
> abhijat
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message