[ http://issues.apache.org/jira/browse/BEEHIVE-351?page=comments#action_63698 ] Kyle Marvin commented on BEEHIVE-351: -------------------------------------
I'm working on a checkin that will add a new attribute to @ControlImplementation: boolean isTransient() default false; that declares the state model for a control implementation. If isTransient=false, the control is considered stateful, must implement java.io.Serializable, and will have its state included as part of the serialization graph of the containing bean. If isTransient=true, then it declares that the impl holds no state (i.e. control properties contained in the bean are the only persisted state) and so impl instances will not be serialized, need not implement java.io.Serializable, and will be automatically reinited (to a new clean impl instance) after deserialization. The JCS annotation processor will enforce that all control implementations where isTransient is false (either through explicit declaration or acceptance of the default) must implement java.io.Serializable or a processor error will be generated. This is taking a hard-line, but I think it is better to get a developer thinking about the impl state model sooner rather than later rather than the current situation, when you don't think about it till the first time someone attempts to serialize at runtime. I'll open a separate JIRA docs issue stating that the programming model docs should have a discussion of control state (including the above). > JCS annotation processor should check serializability > ----------------------------------------------------- > > Key: BEEHIVE-351 > URL: http://issues.apache.org/jira/browse/BEEHIVE-351 > Project: Beehive > Type: Bug > Components: Controls > Versions: V1Beta > Reporter: Kyle Marvin > Assignee: Kyle Marvin > Priority: Minor > Fix For: V1 > > Looking at the tomcat log file after a Controls detailed test run, I see lots > of errors of the form: > java.io.NotSerializableException: > org.apache.beehive.controls.test.controls.property.BoundPropertyControlImpl > ... > The JCS annotation processor should enforce that impl classes are marked as > Serializable. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira