myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ingo Düppe <>
Subject managed-beans, spring references, and serializable
Date Mon, 25 Sep 2006 16:51:41 GMT

I have a conceptional question. Within my application I define a 
managed-bean "registrationController" that gets a reference to a spring 
bean "registrationService" by the jsf property injection. The spring 
bean is stateless and is not serializable, so I need to define the field 
reference in "registrationController" as transient. This prevents me for 
getting NotSerializableException.

But what happens if the session is reloaded, will jsf reinject the 
Is there any recommended way how to deal with this.

The obvious way to make the service bean serializable doesn't seem to 
work, because a whole data access layer is bound to the service bean.

Or do I need to clearly separate. All managed-beans that have a 
reference to the service layer need to be scoped as application (or 
maybe as request) and only the value objects or entities are allowed to 
be stored in the session scope.


Here is an example of my configuration:

View raw message