[ http://issues.apache.org/jira/browse/BEEHIVE-528?page=history ]
Mridul Muralidharan updated BEEHIVE-528: ---------------------------------------- Attachment: javabean.diff The dif tries to do the following : a) PropertyKey 1) Make _getMethod transient. 2) Verify that it is non-null before all _getMethod reference. 3) If it is null , repopulates the cached method from the _propertySet. b) Changed "JavaBean" to "Java-Bean" for the manifest generation. > Compliance with javabean spec > ----------------------------- > > Key: BEEHIVE-528 > URL: http://issues.apache.org/jira/browse/BEEHIVE-528 > Project: Beehive > Type: Bug > Components: Controls > Versions: V1, V1Alpha, V1Beta > Environment: All env's > I tested on win2k , x86 > Reporter: Mridul Muralidharan > Priority: Critical > Attachments: javabean.diff > > Essentially two issues : > 1) The manifest entry for a Control in the control jar is not correct. > 2) The serialization of the ControlBean is failing. > Here is the email exchange I had with Kyle about this in the alias. > Thanks > -- > Mridul, > The intention is that Controls should be 100% conformant with the > JavaBeans spec. You should be able to do things like: > - load, introspect, and use the Control bean class in any JavaBeans aware > editor > - use a Control anywhere a JavaBean can be used (like <jsp:useBean> JSP tag) > If there are areas where they are not, then these should be filed as > high-priority JIRA issues. I checked the JAR spec, and "Java-Beans:" > is the correct manifest attribute, so this is definitely an > oversight/bug. > Both this and the serialization issue (serializability of all > code-generated or supporting runtime classes is definitely a reqt too) > should be opened as "Critical/fix by V1" issues. > Your Controls questions and feedback are proving to be invaluable.... > keep 'em coming! :) > -- Kyle > On 4/14/05, Mridul Muralidharan <[EMAIL PROTECTED]> wrote: > >> Hi all, > >> > >> Since ControlBean is essentially a javabean , I wanted to see the > >> interoperatability of controls with a pure javabean env. > >> For this , I got the BDK1.1 > >> (http://java.sun.com/products/javabeans/software/bdk_download.html - yep > >> , I know this is old !) and tried to load a simple control jar in it. > >> I had to modify the BDK code to also accept "JavaBeans: true" as a > >> javabean (it had a check for only "Java-Beans" - btw , is this valid ? > >> Have not checked the spec yet on this). > >> What I found was that when I try to serialize a control after having > >> customized it , it throws an exception indicating that it cant be > >> serialized. > >> On some digging I found that this was 'cos > >> "org.apache.beehive.controls.api.properties.PropertyKey" had a field > >> "Method _getMethod;". > >> Now , since Method is not serializable , this fails serialization of the > >> entire ControlBean. > >> > >> So question would be whether this is the intended behavior - as in > >> Controls were not expected to interoperate with a plain vanilla javabean > >> env ? > >> (From what I have seen till now , beehive seems to go to great pains to > >> maintain interoperability and is not just using and riding over the > >> javabeans framework). > >> If it is expected to interoperate, then I guess this would be a bug. > >> > >> Any thoughts , comments , help would be greatly appreciated ! > >> > >> Thanks and Regards, > >> Mridul > >> -- 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