Sep 25th, 2012, 10:23 AM
@Scope request and prototype in 3.1.2 with struts2 controllers
I am trying to upgrade from 3.0.3 to 3.1.2. It is a struts2 app, with a controller/action marked as @Scope("request"). A new action object is created on each request. The action bean has a SearchCriteria object injected into it. The SearchCriteria class is marked with @Scope("prototype"). So I'd expect a new one to get created on every request, which is how it worked with spring 3.0.3. But now first time it sees it as a prototype and creates a new one, but from then on it uses a cached version. I've tried to debug it, but am getting no where fast.
Maybe there is a new configuration setting I'm not aware of? Or any other ideas would be appreciated.