[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Make session information available in non-UI thread  XML
Forum Index -> Development
Author Message
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5510
Offline

(from mail conversation)

Most functions of e.g.HttpSessionAccess assume that you are running in a request-response thread that was initiated by a client-roundtrip.

If creating a thread on server-side on your own, then the thread environment data is missing. What you can do to overcome is:

Code:
     public void onXyzAction(ActionEvent event)
     {
         // here: running in UI request/response thread!
         Thread tParallel = createParallelThread(...);
         ThreadData.injectThread(tParallel);
     }
 


Now basic information (e.g. session reference) will be transferred and much more functions of HttpSessionAccess will find their environment.

Kind regards! Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team