Hi Lelsey,
> Seems you can specify alternate addresses in the config.xml - but that
would
> still mean that you are hardcoding the addresses in the config file.
Yes, the idea was to allow the *same* level of flexibility around overriding
via the config file, as one would have for a non-replicated endpoint (in
which case the address specified in the WSDL can be overridden via the
"address" attribute of the <jaxws:client> bean in config).
So in the replicated case the alternateAddresses property is intended to be
an analogue for the way this /jaxws:client/@address attribute is used in the
non-replicated case.
> The test for say testOverriddenSequentialStrategy seems to set
> up a ControlService class to run on the address REPLICA_C. Then
> it sets up the greeter to use
> {http://cxf.apache.org/greeter_control}ReplicatedPortA but then
> when the client invokes the service, the endpoint used is
> actually REPLICA_C?
Yeah, so the idea of the test is to trigger a failover event by ensuring
from the get-go that there's nothing listening on the REPLICA_A port. So the
client will try to bind to that address first, and then failover as
appropriate until a live address is found (in this case for REPLICA_C).
> Is there also a way to override other parameters on the client e.g.
> connection/read timeout and SSL parameters like disabling hostname
checking?
Well for the failover aspect, only the address can be overridden.
But I don't see why the usual approach to configuring the HTTPS parameters
shouldn't work in this case, because there's no coupling between the
overridden address(es) and the <http:conduit> beans used to specify the TLS
config. So I think it should be fine to just specify a <http:conduit> bean
for each logical port and then override the physical addresses as described
before.
Cheers,
Eoghan
On 26 February 2010 23:03, LTay <[email protected]> wrote:
>
> Hi Eoghan,
>
> Thanks for that, I've been looking at the test and the config file below.
> I'm not sure if I understand it correctly.
>
> Seems you can specify alternate addresses in the config.xml - but that
> would
> still mean that you are hardcoding the addresses in the config file.
>
> Maybe you can confirm for me if I understand it correctly. The test for say
> testOverriddenSequentialStrategy seems to set up a ControlService class to
> run on the address REPLICA_C. Then it sets up the greeter to use
> {http://cxf.apache.org/greeter_control}ReplicatedPortA but then when the
> client invokes the service, the endpoint used is actually REPLICA_C?
>
> Is there also a way to override other parameters on the client e.g.
> connection/read timeout and SSL parameters like disabling hostname
> checking?
>
> Thanks,
> Lesley
>
>
> Eoghan Glynn-4 wrote:
> >
> > Hi Lesley,
> >
> > The alternate addresses in the WSDLs are indeed used by default, but you
> > can
> > override this by specifying an alternate address list in the config.
> >
> > See the FailoverAddressOverrideTest[1] and particularly the associated
> > config[2] for details.
> >
> > Cheers,
> > Eoghan
> >
> > [1]
> >
> http://svn.apache.org/repos/asf/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/clustering/FailoverAddressOverrideTest.java
> > [2]
> >
> http://svn.apache.org/repos/asf/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/clustering/failover_address_override.xml
> >
> >
> --
> View this message in context:
> http://old.nabble.com/Setting-up-ClientProxies-to-use-for-Failover-tp27716894p27724457.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>