I was thinking about some things, and I am not sure about how JSF manages my beans. I know that a managed-bean stored in session scope is shared throughout all requests in that user's session, but what about request scope managed-beans? Are they pooled or even shared accross multiple requests? I need to know if it is safe to use instance variables in my backing beans. I know it does not work for Servlets and Struts but, hey, this is JSF! Clarifying is very appreciated
Henrique Sousa<br />SCJP 1.4<br /> <br />All men die, not all men really live - Braveheart, 1995
posted 9 years ago
The simplest thing to do would be to place a System.out.println in your bean's constructor and find out... And what you would find is that request scope beans are not reused -- they are constructed when needed. These beans are usually there to back a HTML FORM, so they are cheap to construct -- there should be no need to "optimize" this by pooling or reuse -- that would only slow things down!