Am 02.03.2012 15:02, schrieb Isuru Suriarachchi:
Hi Christian,

Thanks for your directions and I tried your sample in Karaf. So it looks
like your service is also implemented as an OSGi bundle and the context is
loaded through blueprint. So the normal war deployment for CXF services is
not possible there.

Actually my scenario is little different. We've created our own server
using equinox and it has OSGified Tomcat in it. I have CXF and Spring as
two separate bundles in the OSGi environment. Our OSGified Tomcat is
capable of deploying webapps when the .war file is copied into a particular
directory. So the webapp is not deployed as an OSGi bundle.

Now I'm trying to support CXF services coming from webapps. Of course we
can put all CXF and spring jars in the WEB-INF/lib and get it to work. But
I'm trying to use the CXF and spring bundles which are already in the OSGi
environment. So the Tomcat bundle gets wired up with CXF and spring bundles
and the webapp uses those through the Tomcat bundle.

So I can't use blueprint as my webapp is not an OSGi bundle. Do you think
my scenario is possible?
I am not sure if that is possible I do not have much experience in war deployment inside OSGi.

In Karaf it is also possible to deploy .wab files these are .war files with an OSGi manifest. So that might also work for you. It may even be possible to deploy .war files in karaf. At least there is a war feature but I have not
tested if it works with plain war files.

In any case it might be worth a try if you can replace your own server with karaf as it would surely safe a lot of work if you
do not have to maintain your own platform.

However I tried your service on our service just to check whether it works
that way. First I installed blueprint bundles on our OSGi environment and
then installed your service bundles. All bundles got activated and there
are no errors on the console. But I'm not sure whether the blueprint.xml is
properly read and the service is registered. Is there a way to check that?
In Karaf you can use the list command which also reports if blueprint and spring dm contexts are activated properly.
Besides that you should see in the log when CXF starts.

Christian

--

Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com

Reply via email to