|
|
|
[
Permlink
| « Hide
]
David Jencks - 24/Mar/08 04:09 PM
Fixed rev 640636.
I'm no expert in how this is supposed to work, but the comment in the trunk code makes me wonder if the patch is correct.
Without the patch, a URI with ?discoveryURI=foo will result in setting the discoveryURI and other URIs will use the default. With the patch, IIUC, the default will never be used. After further thought I've reverted the patch as I think it can't possibly be correct to always overwrite the default multicast info. I don't understand how this is supposed to work well enough to fix it without help.
It looks to me as if it is possible to specify the discoveryURI with the current code by using configurations like <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000?discoveryURI=multicast://239.3.7.0:37000" /> and <networkConnector name="..." uri="multicast://239.3.7.0:37000?discoveryURI=multicast://239.3.7.0:37000"> i.e. specifying the discoveryURI as a uri query parameter even when directly specifying the discoveryURI. If this is the expected usage then perhaps a documentation update is what is required, although the first example looks weird to me. Perhaps a flag as to whether the uri is intended to be the discovery URI would be more appropriate or perhaps the code processing the first case could add the discoveryURI as a parameter itself. Submitted the patch for review. With this patch, you don't have to use a query parameter to specify a host:port. You can simply specify it as follows: multicast://<host>:<port>. However, the patch doesn't preclude you from specifying the discoveryURI via a query paramter; doing so will override <host>:<port> provided via the URI.
Also, the default group value, which is "default", can only be overriden via a query parameter; as I think it should. For example, with the URI below, the agent will end up using the default IP and port number, but is given a group name of "foo". multicast://default?group=foo |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||