Is there any reason why a request scoped Spring object would be cached between requests, by a injected @SpringBean field?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The Spring bean shouldn’t be, no, but Wicket doesn’t inject the Spring bean directly into the wicket component, it generates a serializable proxy for the target spring bean definition, and injects that into your component. That proxy may be cached, dependening on your wicket component, but the target spring bean is still managed by Spring itself, and request scoped beans should remain so.
Without any more information as to why you’re asking the question, I can’t be much more help than that, other than to suggest you turn on DEBUG-level logging for Spring, and watch the request-scoped bean being created.