Mantis - Resin
Viewing Issue Advanced Details
4049 minor always 05-25-10 09:51 08-01-11 13:54
ferg  
ferg  
normal  
closed  
fixed  
none    
none 4.0.21  
0004049: activate @SessionScope programmatically
(rep by sweigersf)

I have a delicate problem - I'm trying to use RWT (http://eclipse.org/rap) [^] as a user interface for an Ajax web application. The problem with RWT is that it runs its user interface thread in a separate thread than the servlet's session thread. This causes Resit to throw the following error when I try to inject SessionScoped services:

javax.enterprise.context.ContextNotActiveException : '@javax.enterprise.context.SessionScoped' is not an active Java Injection context.
at com.caucho.config.inject.InjectManager.getContext( InjectManager.java:1939)
at alchemy.rwt.AlchemyEntryPoint.createUI(AlchemyEntr yPoint.java:33)
at org.eclipse.rwt.internal.lifecycle.EntryPointManag er.createUI(EntryPointManager.java:92)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.cr eateUI(RWTLifeCycle.java:244)

Is there some way that I can activate a session scope for a different thread than the servlet's session thread

Notes
(0005411)
ferg   
08-01-11 13:54   
server/2100

WebApp.runInSessionContext(String sessionId, Runnable task);