are managed beans singletons
Hi Everybody,
I have a java class that I have defined as a managed bean my faces-config.xml.
<managed-bean>
<managed-bean-name>dataRetriever</managed-bean-name>
<managed-bean-class>test.DataRetriever</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
The DataRetriever class has the following method:
public List getVehicleBeanArray(){
List dataBeanArray = getDataBeanArray();
return dataBeanArray;
}
In my jsp file I have a dataTable
<h:dataTable value="#{dataRetriever.vehicleBeanArray}"var="vehicle">
..-
In JSF, would this class be a singleton ?
What would the consequences be of making "List dataBeanArray" a private instance variable, instead of keeping it in the method scope.
Also let me mention that I come from a Struts backgroud, where the Action classes are Singletons.
Thanks in advance
Vikas

