Hi,

well first of all Spring-DM isn't supported any longer so it's actually
best to look for an alternative solution like blueprint or
DeclarativeServices maybe.
BUT if you want to use Spring-DM you still can do so, it still works. Only
Pivotal (or whoevertheyarenow) doesn't support Spring-DM since a long time
anymore.

Now concerning the needed features:


> However it turns out that I also need to install pax-war as well which I
> do not quite understand. Referring to 'Spring Dynamic Modules in Action'
> p96, it indicates that the Spring-dm web extender should pick up the war
> file automatically, thus in my understanding I should not need to install
> 'pax-war'.


I don't know the book, but usually those samples are working with
standalone OSGi applications, therefore you need to take a different look
at it when trying to build your
own application with Karaf. As Karafs intention is to provide a
out-of-the-box infrastructure for any kind of OSGi application you just
don't need those "thirdparty" infrastructural bundles anylonger.

Therefore for a Spring application with OSGi you'll need the following
Features:

spring 3 - afaik 4 doesn't work with spring-dm anymore, but I never tried
spring-dm
war
and spring-dm-web

You might as well take a look at the pax-web related sample at [1] and the
corresponding integration test [2].

regards, Achim

[1] -
https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples/war-spring-osgi
[2] -
https://github.com/ops4j/org.ops4j.pax.web/blob/master/pax-web-itest/pax-web-itest-karaf/src/test/java/org/ops4j/pax/web/itest/karaf/SpringOsgiKarafTest.java



2015-11-04 23:04 GMT+01:00 jtkb <[email protected]>:

> Hello all,
>
> I would like to use spring-dm and spring-dm-web in Karaf and I'm fairly
> new to Spring altogether.  Currently I am trying to get an understanding of
> what I must install in a Karaf instance to allow me to deploy spring-dm-web
> enabled bundles and ultimately I would like to use JSF too. To get an
> understanding I built the Pax Web Spring Sample as indicated on this
> StackOverflow post by Achim :
>
>
> http://stackoverflow.com/questions/15820185/getting-all-of-it-to-work-war-osgi-spring-beans-maven
>
> As a minimum I though I would have to install the following features into
> Karaf to allow the above spring sample to work:
>
> spring-dm
> spring-dm-web
> jetty
>
> However it turns out that I also need to install pax-war as well which I
> do not quite understand. Referring to 'Spring Dynamic Modules in Action'
> p96, it indicates that the Spring-dm web extender should pick up the war
> file automatically, thus in my understanding I should not need to install
> 'pax-war'.
>
> Could someone correct my understanding of what features I need to install?
>
> Also, to try and use JSF I went onto install pax-jsf-support however this
> causes the Pax Web Spring Sample bundle to fail. Firstly, I'm assuming JSF
> support should be available to spring-dm-web enabled bundles I deploy by
> installing pax-jsf-support or is this incorrect?
>
> Thanks
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Reply via email to