Hi Sergey,

thanks for your reply. However, I'm not sure if I understand following:

> If we have single web.xml with multiple servlet-Application pairs then
> we can only use JAX-RS ApplicationPath annotation to make it work.

> (...) set "jaxrs.application.address.ignore" servlet parameter to 
> "false" in CXF 3.0.0 given that by default the servlet pattern is 
> expected to override ApplicationPath.

So... especially according to the JIRA ticket, servlet patterns are expected to 
override ApplicationPath, but it does not work so at this moment. Therefore 
ApplicationPath is the only way to have multiple JAX-RS applications, until the 
ticket is fixed. Do I understand it right?

Then (after fixing the ticket) the web.xml from my original post should work as 
expected, correct?

Thanks for explanation,
Petr


-----Original Message-----
From: Sergey Beryozkin [mailto:sberyoz...@gmail.com] 
Sent: Tuesday, April 22, 2014 2:37 PM
To: users@cxf.apache.org
Subject: Re: Troubles with multiple JAX-RS applications in one web.xml

Hi

CXF creates a dedicated endpoint per every context/application and each 
endpoint has its own address, default is "/". The actual servlet URL pattern is 
not part of the internal CXF endpoint address.

Suppose we have a single Spring application context with Spring 
jaxrs:server/@address="/".

In this case we can easily have multiple CXF servlets supporting the same 
single endpoint with each of the servlets adding its URL pattern to the actual 
endpoint identification.

If we have single web.xml with multiple servlet-Application pairs then we can 
only use JAX-RS ApplicationPath annotation to make it work.

ApplicationPath is recognized by default right now, but see 
https://issues.apache.org/jira/browse/CXF-5702,
one will need to set "jaxrs.application.address.ignore" servlet parameter to 
"false" in CXF 3.0.0 given that by default the servlet pattern is expected to 
override ApplicationPath.

HTH, Sergey






On 22/04/14 11:34, Dolezal, Petr wrote:
> I've got an additional information from my colleague. He tried as a 
> work-around to split the web application. Hence he deployed two web 
> applications, each containing just one of the two parts from the original 
> web.xml. So, the backup plan does not work and it is definitely a problem.
>
> There is some undesired sharing across the contexts. The important 
> information here might be that our web server is Jetty embedded in Equinox 
> OSGi container with classical deployment model (i.e. not WABs, just common 
> web applications), but I guess it could happen in a different environment too.
>

Reply via email to