Using @Async annotation I want to call a method in a different thread that has access to Session and Request scoped classes.
However when the ApplicationContext tries to get the bean the following exception is generated:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.sessionInfoClass': Scope 'session' is not active for the current thread;
I had tried extending ApplicationContextAware class to hold the main thread context.
Also I had tried the suggested solution from this question How to enable request scope in async task executor
Source coude is in Github