[jboss-jira] [JBoss JIRA] (WFLY-410) Implement custom Stack resource for JGroups to maintain protocol order

Richard Achmatowicz (JIRA) jira-events at lists.jboss.org
Fri May 31 11:42:54 EDT 2013


    [ https://issues.jboss.org/browse/WFLY-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778513#comment-12778513 ] 

Richard Achmatowicz commented on WFLY-410:
------------------------------------------

Need some help with this one. 
I started the implementation of a custom StackResource which holds the protocol order as a List<String> of protocol names. This variable is accessed by StackResource.getProtocols() and is updated each time we call registerChild(address, resource)/removeChild(address).

Everything was fine until I started looking at the marshalling code. In JGroupsSubsystemXmlWriter, I need to be able to access the StackResource in order to pick up the ordered list via StackResource.getProtocols(), but there is no OperationContext to work with. There must be a root resource which I can navigate from to get to the StackResource using Resource.navigate(resource, address), but i'm not sure which resource to start from, and whether this depends on the mode i'm in (standalone or domain). Any ideas?
   
Also, Resource.getChildren() returns a set and not a list. I only really need the protocol order for constructing the JGroups stack at runtime - but unless I use something like OrderedSets and a Comparator, when reading the resource, the user will see a list of protocol=X children which are not necessarily in the correct order. Not 100% sure that this is worth trying to set up, as there is otherwise stated no guarantee that protocol children will appear ordered. In this sense, having a read-only variable called protocols which shows the order is marginally better. WDYT?


 
                
> Implement custom Stack resource for JGroups to maintain protocol order 
> -----------------------------------------------------------------------
>
>                 Key: WFLY-410
>                 URL: https://issues.jboss.org/browse/WFLY-410
>             Project: WildFly
>          Issue Type: Task
>          Components: Clustering, Domain Management
>            Reporter: Richard Achmatowicz
>            Assignee: Richard Achmatowicz
>            Priority: Minor
>             Fix For: 8.0.0.Beta1
>
>
> A JGroups stack is a transport together with an ordered list of protocols. The transport and the protocols are maintained as child resources. There is no direct way to maintain the order of a set of protocol child resources, so we need to implement a custom resource which does this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list