Signed-off-by: Jan Bartel <janb@webtide.com>
This commit is contained in:
parent
9dd2369a53
commit
88d1ead25b
|
@ -79,10 +79,10 @@ public class WebListenerAnnotation extends DiscoveredAnnotation
|
|||
HttpSessionAttributeListener.class.isAssignableFrom(clazz) ||
|
||||
HttpSessionIdListener.class.isAssignableFrom(clazz))
|
||||
{
|
||||
java.util.EventListener listener = (java.util.EventListener)_context.getServletContext().createInstance(clazz);
|
||||
MetaData metaData = _context.getMetaData();
|
||||
if (metaData.getOrigin(clazz.getName()+".listener") == Origin.NotSet)
|
||||
{
|
||||
java.util.EventListener listener = (java.util.EventListener)_context.getServletContext().createInstance(clazz);
|
||||
ListenerHolder h = _context.getServletHandler().newListenerHolder(new Source(Source.Origin.ANNOTATION, clazz.getName()));
|
||||
h.setListener(listener);
|
||||
_context.getServletHandler().addListener(h);
|
||||
|
|
|
@ -62,4 +62,13 @@ public class ListenerHolder extends BaseHolder<EventListener>
|
|||
|
||||
super.doStart();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return super.toString()+(_listener == null?"":": "+getClassName());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue