[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: ISSUE 37: Injection on private fields - or not
http://www.osoa.org/jira/browse/JAVA-37 -----Ursprüngliche Nachricht----- Von: David Booz [mailto:booz@us.ibm.com] Gesendet: Mittwoch, 16. April 2008 14:28 An: sca-j@lists.oasis-open.org Betreff: [sca-j] NEW ISSUE: Injection on private fields - or not TARGET: Java Common Annotations an APIs (working draft - 28 Feb 2008: sca-javacaa-draft-20080228.doc ). DESCRIPTION: The spec is widely inconsistent in its approach to injection on private fields. The first question that needs to be answered is whether or not injection on private fields is allowed, disallowed, or requried to be supported. There was discussion of this during the formation of the OSOA V1.0 spec, where I believe the resolution was to disallow injection on private fields. Despite that, the spec text was never sufficiently addressed. As a result, I think the Java TC needs to first re-debate this issue (as there may be other interpretations around due to lack of clarity in the spec), and then clean up the text accordingly. As evidence of the chaos, see the following non-exhaustive list: (a)@conversationID: line 349: If a protected or public field or setter method is annotated with @ConversationID, then the conversation ID for the conversation is injected onto the field The type of the field is not necessarily String. System generated conversation IDs are always strings, but application generated conversation IDs may be other complex types. with an example on line 1572: @ConversationID private String ConversationID; (b) @property (line 1174) Properties may also be injected via public setter methods even when the @Property annotation is not present. However, the @Property annotation must be used in order to inject a property onto a non-public field. In the case where there is no @Property annotation, the name of the property is the same as the name of the field or setter. (c) @reference has similar text. (d) And then in the @componentName and @context section there are also private fields being annotated, and neither section addresses private/public. These are also both injection sites. PROPOSAL: This is not a formal proposal, but is intended to smoke out any staunch opposition. (a) Injection on private fields is disallowed. (b) Cleanup the spec text - this is editorial work IMO. Dave Booz STSM, SCA and WebSphere Architecture Co-Chair OASIS SCA-Policy TC "Distributed objects first, then world hunger" Poughkeepsie, NY (845)-435-6093 or 8-295-6093 e-mail:booz@us.ibm.com http://washome.austin.ibm.com/xwiki/bin/view/SCA2Team/WebHome --------------------------------------------------------------------- To unsubscribe from this mail list, you must leave the OASIS TC that generates this mail. You may a link to this group and all your TCs in OASIS at: https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]