Question

I need a specific scope in my spring-managed (w/ spring-security) web application. But this scope must have a narrower scope than session and wider than request. Corresponding beans should be initialized and destructed on certain cases, within current session. But for sure only destructed for the user who requested such.

I successfully implement a custom-scope but it is not user-aware and when I try to finalize it, all created beans on that scope are finalized.

Is there any way to initialize beans with e.g logged user name?

In a nutshell, I need to initialize some of the variables on such beans on certain cases, that's why I want to destroy and re-initialize them.

Any suggestion will be well accepted,

Thanks all.

Edit: As @Stefan suggested to use webflow, even that'll probably solve our issues i think it doesn't seem an acceptable method because our bunch of pages are dependent to fields defined in spring beans. Now we have to bind them to viewscope/flowscope.

I still need a quicker way to handle this issue,

Thanks.

No correct solution

OTHER TIPS

You might have a look at Spring Webflow. It works with JSF and has a 'flow scope' that is between request and session scope.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top