Hi, I´m using appfuse with struts 2 arch. I have a custom interceptor that uses a Manager class to retrieve some information from DB for a specific user, here´s what I have:
1) User X ControlePeso relationship as oneToMany relationship being multiple ControlePesos for 1 user. 2) A method where I take all ControlePesos for a specific user using User.id as parameter: public List<ControlePeso> getTodosDoUsuario(long idUser); //From ControlePesoManager 3)A custom interceptor where I take a reference to ControlePesoManager: private ControlePesoManager controlePesoManager; public void setControlePesoManager(ControlePesoManager controlePesoManager) { this.controlePesoManager = controlePesoManager; } 4) In the intercept method for this interceptor I get the user from SecurityContext: Authentication auth = SecurityContextHolder.getContext().getAuthentication(); User user = null; if (auth != null && auth.getPrincipal() instanceof UserDetails) user = (User) auth.getPrincipal(); 5) Then i call the ControlePesoManager getTodosDoUsuario method wich returns me a list wich I save in users session. My concerns are about thread safety as knowing that Interceptors are not thread safe!!! I´d like some comments on this so I could clear my mind.. Marcos Maia. -- View this message in context: http://www.nabble.com/Struts-2-interceptor-using-Manager-reference%2C-thread-safety-question%21-tp19885868s2369p19885868.html Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]