struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <>
Subject Re: Struts seems to reset the action instance while its still in interceptor
Date Mon, 04 Nov 2013 12:02:08 GMT
2013/11/4 Ali Akhtar <>:
> Thanks Lukasz, this solved the problem. I really appreciate your help.
> Perhaps it should be mentioned more clearly in the documentation that
> interceptors are meant to be singletons. (If its already mentioned and I
> missed it, I apologize).

> One more question which I'd appreciate if you could answer. Is anything
> stored via:
> ServletActionContext.getContext().put(..)
> unique per request as well? E.g, if multiple concurrent requests were being
> made to /foo action, and in the interceptor I was putting a db connection
> object in ServletActionContext.getContext() for each request, can I be sure
> that each db connection put there will only be shared by the instance of
> the Action for that particular request?

ServletActionContext extends ActionContext which is a ThreadLocal
value thus means it's instantiated per request so each action has its
own unique ActionContext.

+ 48 606 323 122

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message