Hi Drazen
On 13/12/12 08:40, Dosta wrote:
Hi,
I tried implementing and registering two simple servlets
(javax.servlet.http.HttpServlet) on "/app/first" and "/app/second". This,
normally, works just fine.
OK, thanks
I think the problem is with the implementation of two
CXFNonSpringJaxrsServlet-s and their basic implementation that involves two
JAXRSServerFactoryBean().create() calls (one per servlet) in the overridden
createServerFromApplication method. These calls seam to restart the jetty
servers so that only the last registered servlet is active? Can I do it some
other way?
Yes, I actually recall now, I had similar issues when working on one the
non-OSGi demos where I was trying to create Jetty-transport endpoints
with overlapping addresses which is exactly the same case here.
I've no idea yet where the problem is, at Jetty or CXF Jetty transport
level, this will need to be investigated. It works OK AFAIK with
Spring/Blueprint when CXF Servlet transport is used (with no address
overwriting) but obviously breaks in this case...
I can suggest a workaround, try registering a single servlet at "/app"
and have your Application providing two root resources, one listening at
"/first", another one - at "/second" or say "/first/a", "/second/b" as
required,
Thanks, Sergey
BR,
Drazen
--
View this message in context:
http://cxf.547215.n5.nabble.com/CXF-in-OSGi-Multiple-applications-tp5720093p5720190.html
Sent from the cxf-user mailing list archive at Nabble.com.