Hi Dave, I guess it is possible. I just wanted to point out though that on a first glance it looks like a design flaw. In my opinion a managed bean should always be related to a JSF page. If it is not related, it should not be declared as a bean of the presentation layer. Eg. a bean responsible for email sending and receiving is a bean that could be used without a presentation layer (eg. in a scheduled background process).
Cheers Rene -----Ursprüngliche Nachricht----- Von: laredotornado [mailto:[email protected]] Gesendet: Mittwoch, 25. November 2009 17:05 An: [email protected] Betreff: Possible to force bean to load into session at session start up? Hi, I'm using MyFaces 1.1.6. I have this declaration in my faces-config.xml file ... <managed-bean> <managed-bean-name>emailController</managed-bean-name> <managed-bean-class> myco.util.jsf.controller.EmailController </managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>mailSession</property-name> <property-class>java.lang.String</property-class> <value>java:comp/env/mail/session</value> </managed-property> </managed-bean> What I am noticing, though, is that the bean is not actually placed into the session until I visit a JSF page that references the bean, like <h:inputHidden value="#{emailController.field1}" /> I'm in a situation where I need to access the bean in a controller before I visit a page that references it. Does anyone know how to tell MyFaces/JSF to load the bean when the session starts? Thanks for all your help, - Dave -- View this message in context: http://old.nabble.com/Possible-to-force-bean-to-load-into-session-at-session -start-up--tp26515381p26515381.html Sent from the MyFaces - Users mailing list archive at Nabble.com.

