serialize « JSF « Spring Q&A

1. Deserialized bean needs scoped dependencies

How can I inject dependencies into a deserialized bean? Some of my Spring beans should be serialized during the render-response phase of our JSF application, and then deserialized at the beginning of ...

2. java.lang.IllegalStateException: Cannot deserialize BeanFactory with id org.springframework.web.context.WebApplicationContext

When I stop my server I get this exception:

SEVERE: Exception loading sessions from persistent storage
java.lang.IllegalStateException: Cannot deserialize BeanFactory with id org.springframework.web.context.WebApplicationContext:/Life: no factory registered for this id
    at ...

3. ViewScoped Bean cause NotSerializableException

Hello I'm using a ViewScoped Bean the Problem is that when call it I get the NotSerializableException. This is the code of my Managed Bean :

public class DemandesBean implements Serializable {