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

[1015 byte] By [vikasphonsaa] at [2007-11-26 15:39:24]
# 1
The managed bean in request scope is generated in every request and it is not singleton. It is destroyed when the response is sent to the client.
amitteva at 2007-7-8 21:57:46 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...