[jboss-as7-dev] make <socket-binding>'s port optional
Jason T. Greene
jason.greene at redhat.com
Mon Mar 19 12:04:23 EDT 2012
On 3/19/12 10:57 AM, Jeff Mesnil wrote:
> Hi,
>
> I am working on an issue in the domain model for HornetQ cluster
> configuration[1].
> To be configured properly, I want to specify only a multicast-address
> and multicast-port but not the local port (and let the OS open one).
>
> According to jboss-as-config XSD (and brian ;) ), it's correct, the port
> attribute of socket-bindingType is indeed optional.
> However, we had multiple places in the code where the port is considered
> mandatory.
>
> I have started to change these places to have a consistent semantic
> between the XSD and the domain model but I have a test failing and I
> can't figure out where is the code responsible for that.
>
> In my branch, I have configured the messaging subsystem[2] with this
> <socket-binding> (no port defined):
>
> <socket-binding name="messaging-group" multicast-address="231.7.7.7"
> multicast-port="9876"/>
>
> But when I run the test suite, I end up with a standalone file[3] where
> the port attribute is set to "undefined"
>
> <socket-binding name="messaging-group" port="undefined"
> multicast-address="231.7.7.7" multicast-port="9876"/>
>
> Newbie question: where is the code in charge of generating the
> standalone file from the messaging.xml subsystem? I am not yet familiar
> with AS7 codebase...
> AIUI, I need to make sure that if the port is not defined in the model,
> it is not written to the XML either.
It's in CommonXml in the controller module. I can see it does not check
to verify the attribute is defined.
--
Jason T. Greene
JBoss AS Lead / EAP Platform Architect
JBoss, a division of Red Hat
More information about the jboss-as7-dev
mailing list