java - Using spring session scope without session -


i have web application defined session scoped userdetail. problem have quartz jobs should use userdetail bean. when job run get:

caused by: org.springframework.beans.factory.beancreationexception: error creating bean name 'scopedtarget.userdetails': scope 'session' not active current thread; consider defining scoped proxy bean if intend refer singleton; nested exception java.lang.illegalstateexception: no thread-bound request found: referring request attributes outside of actual web request, or processing request outside of receiving thread? if operating within web request , still receive message, code running outside of dispatcherservlet/dispatcherportlet: in case, use requestcontextlistener or requestcontextfilter expose current request. 

inside job need inject "technical user" details. possible handle situation when session not present? maybe conditional injection?

edit 1

to clarify. dont want have session in job service. job modifies data , audit log based on user data saved database. user data comes session in job need provide "static" technical user data. ideas?

quartz not know "sessions", if want background job know user submitted job, you have pass information job, in datamap of trigger.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -