geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Jencks (JIRA)" <j...@apache.org>
Subject [jira] Closed: (GERONIMO-4907) GBeanInstance to Ignore Missing Setters
Date Thu, 29 Oct 2009 22:11:59 GMT

     [ https://issues.apache.org/jira/browse/GERONIMO-4907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

David Jencks closed GERONIMO-4907.
----------------------------------

    Resolution: Fixed

fixed in 2.2. rev 831109
trunk rev 831112

This change still does not allow trying to set non-existent properties, but tells you about
all the problems at once rather than just the first one..

> GBeanInstance to Ignore Missing Setters
> ---------------------------------------
>
>                 Key: GERONIMO-4907
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4907
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: kernel
>    Affects Versions: 2.1.4, 2.1.5, 2.2, 3.0
>            Reporter: Quintin Beukes
>            Assignee: David Jencks
>             Fix For: 2.2, 3.0
>
>         Attachments: ignore-missing-accessors.patch
>
>
> Related to GERONIMO-4903
> I submitted a patch which fixes the problem by removing the attributes which don't have
setters. 
> After reading the OpenEJB source I noticed an XBean feature which would be a more correct
fix for the problem.
> Instead of removing the attributes which won't have setters in the class being instantiated
as a GBean, configure the ObjectRecipe to rather ignore those properties which don't have
setters. This has 2 benefits
> 1) Those properties can still be included for "read" access
> 2) If such a property exists for any other GBean, or is added in the future, this will
help that those don't possibly create fatal bugs - which the JettyConnector bug almost was
(you couldn't edit a connector - ever).
> This is achieved by adding the following line after the ObjectRecipe was created:
> objectRecipe.allow(Option.IGNORE_MISSING_PROPERTIES);
> This permissions merely removes the property from the list of properties to "create the
object with", if the accessor wasn't found. 
> Since those properties are still available, they can be accessed by the GBean API, and
thus it doesn't become a requirement to have setter accessors for all persistent properties.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message