[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Session in background thread  XML
Forum Index -> Development
Author Message
mstoyanova

Power User

Joined: 26/09/2019 07:10:15
Messages: 48
Offline

Hi Bjorn,

Is it possible to associate session with current background thread?


Thanks in advance
CaptainCasa

Power User
[Avatar]

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

Hi Marieta,

luckily I understand what you mean... ;-)

For others: certain functions of CaptainCasa are only available if running in the request/response processing (e.g. the http-session).

If you open an own thread during this http-session then this own thread will not be connected to the session environment. So functions using HttpSessionContext will likely fail.

Solution: you need to explicitly pass the context information that you require in the own thread into this thread's processing.

Kind regards! Björn

PS: There are certain parts of context management where CaptainCasa provides some default mechanism: current user/ current tenant (interface IUserAccess/ITenantAccess): DefaultUserAccess and DefaultTenantAccess can be associated with the current session and/or the current thread. - But there is no general way to bind all existing session

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