Ok, I`m using jsf and have managed beans with session scope and
properties other managed beans. Most of them have application scoped
beans references as properties, which makes connection to DB...and...
these fields are defined as transient to prevent serialization.

eg.
class TestBean implements Serializable {
        private String xyz;
        private transient MyService service;
        :
}

in faces-config.xml
<managed-bean>
        <managed-bean-name>testBean</managed-bean-name>
  <managed-bean-class>aaa.bbb.ccc.ddd.eee.TestBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
        <managed-property>
                <property-name>service</property-name>
                <property-class>aaa.bbb.ccc.ddd.MyService</property-class>
                <value>#{service}</value>
        </managed-property>
</managed-bean>

but when the application is restarted, the session scoped beans are
serialized on stop and restored on requesting the same session after
start, but when the class is deserialized, transient fields are null.
Is there any "easy" way to restore transient fields references from the
new session or at deserialization to get only available fields from the
object, not the whole object? Maybe a wrapper of StandardManager!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to