Using a Session Scoped Bean?

Session-scoped beans aren't available in the session like that. Spring manages them, and stores them in the session, but not in a way that you can manually fish them out.

Session-scoped beans aren't available in the session like that. Spring manages them, and stores them in the session, but not in a way that you can manually fish them out. If you want to use the scoped bean, you wire it into your other beans, like any other bean.

There are some things to look out for, though - see here. Essentially, if you want to wire session-scoped bean A into bean B, then bean B must also be session-scoped (or request-scoped), unless you use scoped-proxies - see previous link for info on how to do that.

The code I linked is in an annotated controller, so I can't link in the properties in configuration like the documentation you referenced does. In fact, I had already looked at that documentation. I need this object in every controller too, so I'm not going to convert it all to be XML based.

I also tried autowiring the "myAppUser", that failed with an exception on deployment, is the controller not session or request scoped? I find that hard to believe. – walnutmon Jun 9 '10 at 12:46 @jboyd: Controllers are singleton-scoped by default, like any other bean.

Also, you don't need to put the controllers into XML - only the scoped bean needs to be defined in XML, with defined within it. – skaffman Jun 9 '10 at 17:57.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions