Hi Shahed,
As long as you don't use Spring DM 2.0 you don't need to turn off Blueprint.
So I recommend that you use blueprint for all bundles besides the WAB and only
Spring in combination with Spring-DM 1.2 for your WAB.
In Karaf, you just need to install the needed Spring-Features like
Spring-Web and also
Spring-DM (Version 1.2.1). Using this you should be set :)
Oh and you probably need something like this:
<context-param>
<param-name>contextClass</param-name>
(1)
<param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
(2)
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
(3)
</listener>
Regards, Achim
2012/8/3 shahed100 <[email protected]>:
> Thanks Achim,
>
> So just to clarify, (because I am new to this), I assume you mean
> install and use the Spring DM bundle in Karaf.
>
> Yes, this makes sense, since the technologies should work on any
> container (as DM / blueprint are just bundles) if there are no
> conflicts.
>
> Question :- Do I need to turn OFF blueprint (aries) in someway to
> avoid 2 components trying to open up my deployed JAR (bundle) ?
>
> Regards
> Shahed
>
> On 3 August 2012 12:04, Achim Nierbeck [via ServiceMix]
> <[email protected]> wrote:
>> Well
>>
>> if you stick to using spring dm 1.2.1 (which isn't that much different
>> then blueprint)
>> you still are able to inject any type of Service into your WAB.
>> You just need to make sure you have that special OSGi Application
>> Context class in use of Spring-DM.
>> If you just follow this little rule I think you should be fine with it :)
>>
>> regards, Achim
>>
>> 2012/8/3 shahed100 <[hidden email]>:
>>
>>> I have done about a days worth of reasearch on this, but am not quite
>>> clear
>>> on this yet :-
>>>
>>> My Objective :-
>>>
>>> 1. Develop web apps / wabs etc that use Spring (with annotations etc)
>>>
>>> (The doubt is if applicationContext.xml etc will work in Karaf)
>>>
>>> 2. Develop osgi services (general purpose.. but can be used by web apps )
>>>
>>> 3. Use standards compliant blueprint to inject external osgi services to
>>> my
>>> Spring web app.
>>>
>>> Now I see a lot of talk that leads me to belive that 1 can be done, and 2
>>> can be done.. but not 3.
>>>
>>> Compared to this, Virgo seems to be the best (???) solution if I want to
>>> use
>>> a lot of Spring.
>>>
>>> I like Servicemix and the fact that it has good console integration with
>>> ActiveMq etc and dont really want to moveto Virgo.
>>>
>>> Can anyone pls advice ?
>>>
>>> BTW.. i dont plan to extensively use Servicemix for JBI type stuff... just
>>> as
>>> a general OSGI platform (so just Karaf would also work I guess), but with
>>> the added advantage of having all these other bundles pre-shipped (like
>>> ActiveMq, Camel , Web/jetty etc etc)
>>>
>>>
>>>
>>> Thanks
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://servicemix.396122.n5.nabble.com/Want-to-use-spring-but-should-I-be-looking-at-Virgo-instead-tp5714067.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>>
>> --
>>
>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer & Project Lead
>> OPS4J Pax for Vaadin
>> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
>> Lead
>> blog <http://notizblog.nierbeck.de/>
>>
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://servicemix.396122.n5.nabble.com/Want-to-use-spring-but-should-I-be-looking-at-Virgo-instead-tp5714067p5714068.html
>> To unsubscribe from Want to use spring... but should I be looking at Virgo
>> instead ?, click here.
>> NAML
>
>
>
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/Want-to-use-spring-but-should-I-be-looking-at-Virgo-instead-tp5714067p5714069.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
--
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead
OPS4J Pax for Vaadin
<http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
Lead
blog <http://notizblog.nierbeck.de/>