[jboss-jira] [JBoss JIRA] Commented: (JGRP-1068) Add programmer assigned default processing to @Property annotations
Richard Achmatowicz (JIRA)
jira-events at lists.jboss.org
Fri Oct 2 10:29:49 EDT 2009
[ https://jira.jboss.org/jira/browse/JGRP-1068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12488244#action_12488244 ]
Richard Achmatowicz commented on JGRP-1068:
-------------------------------------------
Bela Ban wrote:
> OK, here are my thoughts on how this could work:
>
> Let's take mcast_addr as an example:
>
> @Property(dependsUpon="mcast_port", defaultIPv4="224.5.6.7", defaultIPv6="::FF88",converter=IpAddressConverter.class)
> private IpAddress mcast_addr;
>
> Here's what happens:
>
> * 1st round: Property processing: all user defined values from the
> XML or system properties are set, using the converter
I assume also that if no property value is specified by the user (via config or system property), we do nothing.
> * 2nd round (sanity checking and determination of IP type): iterate
> through all protocols and
> o for each field F which has a @Property annotation and is an
> InetAddress or IpAddress:
> + record the type of the address (IPv4 or IPv6)
> o At the end of the processing, check whether all addresses
> have the same type, taking into account the addresses above
> plus system props like net.preferIPv4Stack
> o We now have a type for all addresses: IPv4 or IPv6. If this
> is not the case, thow an exception and terminate
> * 3rd round: we iterate through all the protocols and
> o for each field F which has a @Property annotation and is an
> IpAddress or InetAddress (or list of those):
> + If the field's value is null:
> # If there is a default address set in @Property,
> grab the right type and set it
>
>
> The 2nd and 3rd round are squeezed between property processing and init(). This can be done in ProtocolStack.setup() or possibly in Configurator.
> Add programmer assigned default processing to @Property annotations
> -------------------------------------------------------------------
>
> Key: JGRP-1068
> URL: https://jira.jboss.org/jira/browse/JGRP-1068
> Project: JGroups
> Issue Type: Feature Request
> Affects Versions: 2.8
> Reporter: Richard Achmatowicz
> Assignee: Richard Achmatowicz
> Priority: Minor
> Fix For: 2.8
>
>
> There is a need to handle in a systematic way the assignment of programmer assigned defaults to properties in JGroups. THis issue concerns incorporating the assignment of progranmmer assigned defaults using the existing @Property mechanism.
> The following comments explain the issue.
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list