The main reason that we use the SpringJAXRSClientFactoryBean and SpringJAXBServerFactoryBean is I want the users of camel-cxfrs component can still leverage their knowledge of CXF JAXRS front end.

And there are some difference between the client and server configuration, we need to treat them differently.

Because we need to support create the CxfRsClient and CxfRsServer with URI or Spring configuration, we use CxfRsEndpoint and CXFRsSpringEndpoint to support these two requirement.


On 6/16/11 9:33 PM, Christian Schneider wrote:
Hi all,

I am still looking into camel-cxf. I found that the spring configuration
is done in a bit strange way.

For example in the cxfrs component there is a jaxrs and a spring
package. Still classes with spring references are present on both
packages and the packages from a dependency cycle.
There is for example a CxfRsEndpoint and a CxfRsSpringEndpoint. Still
the CxfRsEndpoint creates a SpringJAXRSClientFactoryBean. I would rather
have expected that the CxfRsSpringEndpoint would do that.

Also the SpringJAXRSClientFactoryBean is not looked up in the spring
context but rather created by hand and then configured using the
configure method which calls spring to set the properties. I would
rather have expected that the SpringJAXRSClientFactoryBean is simply
looked up in spring.

Can someone explain to me the reason why it works that way?

Christian



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Reply via email to