[
https://issues.apache.org/jira/browse/CXF-5184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13743333#comment-13743333
]
Sergey Beryozkin commented on CXF-5184:
---------------------------------------
Hi, many thanks for your patch - much appreciated.
One thing I'd like to note, a mock based test is good, but we probably need to
have a system test updated instead, I'm not really sure we can have JAX-RS test
dependency in the clustering feature module, LoadDistributorTest is available
in systests/jaxrs, I copied it from systests/jaxws.
Can you please consider updating LoadDistributorTest or add
LoadDistributorTestSameAddress which will test your scenario ? I can deal with
it later on myself. Right now I'm dealing with many different issues so it
might take me a bit of time :-), but we will get it fixed.
By the way, I'd like to clarify. You have two "library.getAllAuthors();" calls,
what happens during the first call, does it succeed, i.e, does it reach its
target ?
Next, given that we only have a single (same) address set in
SequentialStrategy, what do you expect to happen during a second
"library.getAllAuthors();" call ?
Thanks
> javax.ws.rs.NotFoundException while using LoadDistributorFeature after
> failover of 1st node or with single node configured
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-5184
> URL: https://issues.apache.org/jira/browse/CXF-5184
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.7.6
> Environment: jdk7
> Reporter: Jacek Obarymski
> Attachments: CXF-5184.patch
>
>
> I've configured JAX-RS proxy to work with LoadDistributorFeature.
> If failover occurs on the first node OR when there's only a single 'healthy'
> (no failover) node configured then I'm getting javax.ws.rs.NotFoundException
> as a result of a second call to the proxy.
> All works fine with FailoverFeature or without any clustering features
> enabled.
> {code:tile=proxy inteface}
> @Path("/library")
> public interface Library {
> @GET
> @Path("/books")
> Books getAllBooks();
>
> }
> {code}
> {code:title=client}
> LoadDistributorFeature feature = new LoadDistributorFeature();
> SequentialStrategy strategy = new SequentialStrategy();
> strategy.setAlternateAddresses(asList("http://localhost:8080"));
> feature.setStrategy(strategy);
>
> JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
> List<Feature> features = new ArrayList<Feature>();
> features.add(feature);
> bean.setFeatures(features);
> bean.setAddress("http://localhost:8080");
> bean.setResourceClass(Library.class);
> Library library = bean.create(Library.class);
>
> library.getAllAuthors();
>
> library.getAllAuthors; //I'm getting the exception here
> {code}
--
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