When using execandwait interceptor in In struts2 the session is locked during the initial delay -



When using execandwait interceptor in In struts2 the session is locked during the initial delay -

i have struts2 application has few actions take time load (because of heavy db calls). in order display wait page i'm using execandwait interceptor. setup of action looks this:

<action name="showcustomerholding" class="showcustomerholdingaction"> <interceptor-ref name="defaultstack" /> <interceptor-ref name="execandwait"> <param name="delay">30000</param> <param name="delaysleepinterval">500</param> <param name="threadpriority">1</param> </interceptor-ref> <result name="success">/web-inf/jsp/customerholding.jsp</result> </action>

as test i've set initial delay 30 seconds. in scenario expect never see wait page. instead whole application seems freeze 30 seconds. i've figured out reason happens i'm trying access session object (provided in action implementing sessionaware interface). access session utilize folowing code:

locale locale = (locale)session.get(i18ninterceptor.default_session_attribute);

as can see reason need sesssion check current locale. whole app freezes on line above until inital delay time of execandwait interceptor has run out. seems interceptor has locked session somehow.

has else experienced problem, or know safer way of accessing session? thankful help on this.

thanks fred

session struts2 locale interceptor

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -