cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacek Obarymski (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CXF-5184) javax.ws.rs.NotFoundException while using LoadDistributorFeature after failover of 1st node or with single node configured
Date Sun, 18 Aug 2013 20:08:47 GMT

    [ https://issues.apache.org/jira/browse/CXF-5184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13743351#comment-13743351
] 

Jacek Obarymski edited comment on CXF-5184 at 8/18/13 8:07 PM:
---------------------------------------------------------------

OK, I'll have a look at the system test and try to reproduce the problem there.

In my example actually the first call to "library.getAllAuthors();" is also not successful
when primary address set in 'bean.setAddress("http://localhost:8080");' is same as the alternate
address. 
If I set 'bean.setAddress("http://dummy:8080");' and alternate address to "http://localhost:8080"
then the first call is successfull (calls "http://localhost:8080/library/books") and the second
fails because it calls "http://localhost:8080".
In any case I'm expecting both calls to send request to "http://localhost:8080/library/books"
and return the same response.



                
      was (Author: panjacek):
    OK, I have a look at the system test and try to reproduce the problem there.

In my example actually the first call to "library.getAllAuthors();" is also not successful
when primary address set in 'bean.setAddress("http://localhost:8080");' is same as the alternate
address.  If I set 'bean.setAddress("http://dummy:8080");' the first call is successfull (calls
"http://localhost:8080/library/books") and the second fails because it calls "http://localhost:8080".
In any case I'm expecting both calls to send request to "http://localhost:8080/library/books"
and return the same response.



                  
> 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://dummy: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

Mime
View raw message