Quantcast
Viewing all articles
Browse latest Browse all 9364

Christian Schneider: Big improvements for CXF in OSGi ahead with version 2.6.0

Blog post edited by Christian Schneider

CXF 2.6.0 will bring a lot of improvements for deployment in OSGi. Till now cxf was bundled in one OSGi bundle. Either with all features or with a minimal feature set. Thanks to Dan Kulp cxf is now delivered as individual bundles. So can be installed with only the needed features. Besides the smaller size in many use cases this also means that we have less optional dependencies which make installation difficult. Each bundle defines the imports it really needs. This makes it much easier to get the dependencies right. Of course the Karaf feature file will still be provided to make it easy to install CXF in Apache Karaf.

Based on the work of Dan I recently started to optimize the imports of the typical bundles most people will use from cxf. At the start we had many dependencies like spring, velocity, neethi, .. that I felt should not be needed and make cxf quite big. By refactoring some of the modules I was able to slim these down to the bare minimum. The current code on trunk already reflects these changes.

If you want to try this yourself you can easily install the snapshot of cxf in karaf 2.2.5. As the feature file is not yet changed I uploaded a gist of the commands you need to execute. Remomber to also use the jre.properties.cxf for karaf to disable some default java apis so CXF can replace them with newer versions.

So after this install the karaf list -u command shows the following bundles:

 karaf@root> list -u
START LEVEL 100 , List Threshold: 50
   ID   State         Blueprint      Level  Update location
[  41] [Installed  ] [            ] [   60] blueprint:file:/C:/java/apache-karaf-2.2.6-SNAPSHOT/deploy/datasource-derby2.xml
[  87] [Active     ] [            ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/2.2.1.1_1
[  88] [Active     ] [            ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc/2.2.1.1_1
[  89] [Active     ] [            ] [   60] mvn:org.codehaus.woodstox/stax2-api/3.1.1
[  90] [Active     ] [            ] [   60] mvn:org.codehaus.woodstox/woodstox-core-asl/4.1.1
[  91] [Active     ] [            ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.wsdl4j/1.6.2_3
[  92] [Active     ] [            ] [   60] mvn:org.apache.ws.xmlschema/xmlschema-core/2.0.1
[  93] [Active     ] [            ] [   60] mvn:org.apache.cxf/cxf-common-utilities/2.6.0-SNAPSHOT
[  94] [Active     ] [Created     ] [   60] mvn:org.apache.cxf/cxf-rt-core/2.6.0-SNAPSHOT
                                       Fragments: 95
[  95] [Resolved   ] [            ] [   60] mvn:org.apache.cxf/cxf-api/2.6.0-SNAPSHOT
                                       Hosts: 94
[  96] [Active     ] [Created     ] [   60] mvn:org.apache.cxf/cxf-rt-bindings-soap/2.6.0-SNAPSHOT
[  97] [Active     ] [            ] [   60] mvn:org.apache.cxf/cxf-rt-bindings-xml/2.6.0-SNAPSHOT
[  98] [Active     ] [Created     ] [   60] mvn:org.apache.cxf/cxf-rt-frontend-simple/2.6.0-SNAPSHOT
[  99] [Active     ] [            ] [   60] mvn:org.apache.cxf/cxf-rt-databinding-jaxb/2.6.0-SNAPSHOT
[ 100] [Active     ] [Created     ] [   60] mvn:org.apache.cxf/cxf-rt-frontend-jaxws/2.6.0-SNAPSHOT
[ 102] [Active     ] [Created     ] [   60] mvn:org.apache.cxf/cxf-rt-transports-http/2.6.0-SNAPSHOT
[ 103] [Active     ] [Created     ] [   60] mvn:org.apache.cxf/cxf-rt-frontend-jaxrs/2.6.0-SNAPSHOT

This installation of CXF is ready for SOAP/HTTP and REST with JAX-WS and JAXB on the java side which reflects what most people will need.

To test the features I recommend to install the example from my Karaf Tutorial about CXF.


Viewing all articles
Browse latest Browse all 9364

Trending Articles