[ https://issues.apache.org/jira/browse/GERONIMO-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752897#action_12752897
]
Rex Wang commented on GERONIMO-4216:
------------------------------------
I would like to re-discuss on this improvement, the previous way to set up dynamic gbean in
connector builder is, use java reflection to find out all the public getters and setters.
And the ones both have public getter and setter method is a "valid" attribute and will build
a GAttributeInfo for them.
But the GERONIMO-3874 hope examine the setters (because in a spring ra, the getter is protected.
And what is more, there might be no getter in a RA class definiation), so the purpose of this
jira.
The difficulty is how to determine the type of an attribute. And that is also the reason why
this jira opens such a long time. The current code logic is using the retune type of getter
as the type of attribute, That is reasonalbe absolutely. But if no getter exist, how to "guess"
the type?
I am not sure if the following code logic is acceptable:
1. if both have setter and getter, use the return type of getter.
2. if no getter, check if there is an attribute declaration. if exist, use its type.
3. if no getter and attribute declaration, use the setter arguments type as the attibute type.
(always primative and string)
Any thoughts?
-Rex
> Examine setters methods in connector builder
> --------------------------------------------
>
> Key: GERONIMO-4216
> URL: https://issues.apache.org/jira/browse/GERONIMO-4216
> Project: Geronimo
> Issue Type: Improvement
> Security Level: public(Regular issues)
> Components: connector
> Affects Versions: 2.2
> Reporter: Jarek Gawor
> Assignee: Rex Wang
> Attachments: GERONIMO-4216-b21-updated.patch
>
>
> Currently, the connector builder uses the getter methods to figure out the types for
the attributes for the dynamic gbeans created for the various connector classes. The connector
builder should use the setter methods instead (for example, in cases where there is a write-only
property, i.e. setter method is present but getter is not).
> This is related to [GERONIMO-4131].
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.