I’ve a stateless session bean in an ejb container. If I invoke it from a jsf2 form it works fine, but if I recall the form again it shows me the same data I’ve inserted before. It happens even if I close and reopen the browser. I must wait several minutes until the form shows empty fields.
The stateless session bean is not recreated for each request. It behaves like a stateful one. What’s the wrong?
Application server: Glassfish 3.0.1
Struts doesn’t do anything by itself, it only does what you tell him to do. And I suspect that you’re just misusing things. Showing some code to illustrate the problem might help.
This is not true in general, you can get any instance of a stateless session bean (SLSB). And even if for some reasons you get the same instance in your particular situation (maybe because of the beans pool configuration), this shouldn’t be an issue at all when using SLSB, you should not care of what instance you get and certainly not rely on the state of instances (since they’re stateless).
Back to your question, I suspect that you’re misusing SLSB and expecting things that are not true:
Related questions