You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Kyle Marvin (JIRA)" <be...@incubator.apache.org> on 2005/02/24 16:10:50 UTC
[jira] Created: (BEEHIVE-351) JCS annotation processor should check serializability
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
Assigned to: Kyle Marvin
Priority: Minor
Fix For: V1Beta
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
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Resolved: (BEEHIVE-351) JCS annotation processor should check serializability
Posted by "Kyle Marvin (JIRA)" <be...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/BEEHIVE-351?page=all ]
Kyle Marvin resolved BEEHIVE-351:
---------------------------------
Resolution: Fixed
The isTransient flag was added to @ControlImplementation and serializability checking done in impl annotation processor as of svn revision 165047.
> 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
[jira] Commented: (BEEHIVE-351) JCS annotation processor should check serializability
Posted by "Kyle Marvin (JIRA)" <be...@incubator.apache.org>.
[ 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
[jira] Commented: (BEEHIVE-351) JCS annotation processor should check serializability
Posted by "Kyle Marvin (JIRA)" <be...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/BEEHIVE-351?page=comments#action_63700 ]
Kyle Marvin commented on BEEHIVE-351:
-------------------------------------
Docs improvement opened as BEEHIVE-558.
> 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
[jira] Updated: (BEEHIVE-351) JCS annotation processor should check serializability
Posted by "Kyle Marvin (JIRA)" <be...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/BEEHIVE-351?page=history ]
Kyle Marvin updated BEEHIVE-351:
--------------------------------
Fix Version: V1
(was: V1Beta)
This would be easy enough to fix for beta; however, its is going to require massive changes in test cases and other places which likely don't declare control instances to be serializable.
One kindler, gentler approach would be to just give an APT *warning* if the implementation class is not serializable. This will a) keep from breaking existing impls, and b) allow users to decide whether they care or not.
If we migrate to a warning, though, we may want to provide a way to make the warning go away (w/out adding java.io.Serializable), perhaps something like: @ControlImplementation(transient=true) to indicate that a control impl instance should never be persisted, just its properties (and a new impl instance created on deserialization).
I'm interested in feedback on this....
> 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
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira