* Stefan Pietschmann:
> I want to notify my Avalon component when a session is created or destroyed.
In your listener, you have access to the servlet context, in which
you can set and get attributes:
public void sessionCreated(HttpSessionEvent event) {
((MyComponent)event.getSession().getServletContext().getAttribute("MyComponent")).someMethod()
}
And in your component:
HttpContext context = (HttpContext)
ObjectModelHelper.getContext(objectModel);
context.setAttribute("MyComponent", this);
Best regards,
--
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/