This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.
No, it is not. The aspect IS a stateless bean. A statless bean cannot ever BECOME stateful, it either is or is not stateless. You probably misunderstood the concept of state in a bean.
I would just create a pointcut matching the session-scoped user bean
It depends on what kind of auditing the original poster wanted to achieve. With your solution, you could only audit accesses to the user session bean, which can be limited. With my solution you can audit pretty much everything, and use the user session bean to add user profile information to the auditing. I also think it is a cleaner solution.
this sounds interesting!
Could you elaborate a little bit more on it?
As far as I understood, the aspect intercepts more or less everything the user triggers or operates on and then writes a kind of log to the user bean.