"Thiago H. de Paula Figueiredo" <[email protected]> schrieb am 01.10.2009 
16:28:07:

> > The OssoAccessControllerImpl gets some authentication info from the
> > request and creates a User object.
> > I want(ed) to store this object into the session, so I need an
> > ApplicationStateManager, because the @Session annotation can't be used
> > here (we're in a service). The ApplicationStateManager can be injected
> > into the OssoAccessControllerImpl constructor, so the latter must be
> > request specifice, i.e. per thread.
> 
> It still doesn't need to be per thread. You can even inject Request or 
> HttpServletRequest in a singleton service and you still get the right 
> instance when you invoke some method on them. The instance that is 
> injected is a proxy, not the real object, and this proxy delegates the 
> method calls to the correct instance for that given thread.
> 

Well, this is starting to be much fun! I think I tried @Session which 
didn't work in the service, but I might get away with injecting the 
ApplicationStateManager! Will try that next.

> > I'm still astonished there are so many of them.
> 
> How many assets do you have in your page? I guess it's 7. :)

Will need some quiet minutes to do the counting... :)

Dirk

BGS Beratungsgesellschaft 
Software Systemplanung AG         Niederlassung Köln/Bonn 
Grantham-Allee 2-8 
53757 Sankt Augustin 
Fon: +49 (0) 2241 / 166-500 
Fax: +49 (0) 2241 / 166-680 
www.bgs-ag.de Geschäftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hermann Kiefer 
Nils Manegold 
Thomas Reitz 


  

Reply via email to