Hi,
Yeah, let's say users has 2 bundles, each with a CXF webservice on the
same port:
bundle A - http://0.0.0.0:8080/A
bundle B - http://0.0.0.0:8080/B
Problem is that since they are using the same port, a single Jetty
engine will be shared and each Jetty thread's class loader will be set
to the classloader of whichever bundle started first. So, say bundle A
started first, now the classloaders would be assigned as follows:
bundle A - BundleDelegatingClassLoader for [bundle A]
bundle B - BundleDelegatingClassLoader for [bundle A]
Any incoming requests to the service in bundle B will use the
classloader from bundle A, which is obviously not good,I'm going to
work on it soon, the fix should be set the thread ContextClassLoader
to the classloader of the service object before actually calling the
service.
If your scenario isn't this case, then it won't affect your project.
Freeman
On 2011-5-6, at 下午5:38, Willem Jiang wrote:
How do you deploy your applications?
If you wrap all the applications into a same war or OSGi bundle, it
should be no problem.
If you separate the application into different wars or OSGi bundles,
and these applications are using cxf-rt-transport-jetty, you may
face some kind of application classloader issue.
Willem
On 5/6/11 2:53 PM, Blue Diamond wrote:
Dear CXFers,
I am currently starting multiple endpoints on the same port in our
application.
WS Endpoint: http://localhost:port/app/ws
REST Endpoint: http://localhost:port/app/rest
I have verified that it is working alright. Even after engaging
security,
HTTP Auth for REST and WS-Security for WS, things are working fine as
expected since CXF uses the capability of Jetty socket reuse. I am
able to
access both REST& WS services as before.
I want to go ahead with this approach in our next release.
(Currently we are
using different ports for REST& WS).
Does anyone foresee any problem with this approach? Are there any
technical
issues that I am unaware of?
Thanks& Regards,
Anil
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Connect at CamelOne May 24-26
The Open Source Integration Conference
http://camelone.com
---------------------------------------------
Freeman Fang
FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Connect at CamelOne May 24-26
The Open Source Integration Conference