The lifecycle of the @RequestScoped
and @SessionScopedBean
managed beans are managed by the Servlet container itself since they are basically stored as an attribute of HttpRequest
and HttpSession
respectively. How do JSF manage the lifecycle of the @ViewScopedBean
? I know it gets created when the view is created and is usable till there is a postback to a different view. But I found out that is not garbage collected immediately after we move from that view.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…