-
1. Re: JBoss OSGi and Spring Dynamic Modules
white_sox Apr 24, 2012 9:18 AM (in response to rssole)1 of 1 people found this helpfulWhat version of JBoss are you using? If you deploy these jars to your JBoss, it will become "spring aware":
- spring-osgi-core-1.2.1
- spring-osgi-extender-1.2.1
- spring-osgi-io-1.2.1
- spring-osgi-web-1.2.1
Download them here: http://s3.amazonaws.com/dist.springframework.org/release/OSGI/spring-osgi-1.2.1-with-dependencies.zip
Don't forget to add the header Spring-Context to the MANIFEST.MF. An example: Spring-Context: WEB-INF/spring-*.xml;
For some reason, this strategy doesn't work well if your package is a WAR file, but it works with JAR files.
-
2. Re: JBoss OSGi and Spring Dynamic Modules
rssole Apr 24, 2012 10:37 AM (in response to white_sox)Don't forget to add the header Spring-Context to the MANIFEST.MF. An example: Spring-Context: WEB-INF/spring-*.xml;
This is exactly hint I needed as I am probably blind of too much staring at docs so didn't spotted tip like this one in docs...
If there is, can you plese post url of docs where it is noted?
Anyway, great hint, I'll try it when I get home. Btw, I am using JBoss 7.1.
Thanks
-
3. Re: JBoss OSGi and Spring Dynamic Modules
white_sox Apr 24, 2012 10:50 AM (in response to rssole)1 of 1 people found this helpfulI suggest you read this JBoss OSGi provided examples:
It doesn't explicity address the Spring + OSGI issue, but it does have a section about the Blueprint Container and how to activate it. See: https://docs.jboss.org/author/display/JBOSGI/Provided+Examples#ProvidedExamples-BlueprintContainer and http://static.springsource.org/osgi/docs/2.0.0.M1/reference/html/blueprint.html
In my tests, I could only make the JBoss AS7 "spring aware" by deploying the Spring DM jars, just like I explained. When I activated the Blueprint support in AS7, the spring contexts were ignored.