Fix injection of AsyncListener
This commit is contained in:
parent
4e7fa4b943
commit
a4b9f19e26
|
@ -64,10 +64,9 @@ public class AsyncContextState implements AsyncContext
|
||||||
@Override
|
@Override
|
||||||
public <T extends AsyncListener> T createListener(Class<T> clazz) throws ServletException
|
public <T extends AsyncListener> T createListener(Class<T> clazz) throws ServletException
|
||||||
{
|
{
|
||||||
// TODO: Use ServletContextHandler createInstance use DecoratedObjectFactory.
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return clazz.getDeclaredConstructor().newInstance();
|
return state().getContextHandler().getContext().getServletContext().createInstance(clazz);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue