Guillaume, To clarify the discussion, here is a complement of information about what I do for the moment to deploy my WAR as an OSGI bundle in Apache Felix Karaf. The WAR file is packaged like all the J2EE application. So it contains a META-INF, WEB-INF, ... folders. The MANIFEST File is modified to contain these stuffs required by Pax Web Extender WAR : - Bundle-ClassPath: .,WEB-INF/classes - Import-Package: list of packages required to run the application (javax.servlet, ...) - Webapp-Context: nameofapplication ... More info can be find on PAX Web site about the WebApp-Context, ....
The WAR file contains a Spring Application Context file who will be loaded by the Spring ContextLoaderListener in combination with org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext class (as we run in an OSGI container). I only need to use the following bundles to run my application : [ 155] [Active ] [ ] [ 60] Apache ServiceMix Bundles: jetty-6.1.14 (6.1.14.1) (Servlet/JSP server) [ 156] [Active ] [ ] [ 60] OPS4J Pax Web - Web Container (0.6.0) (Web Container who will allow the deployment of the WAR into the Servlet/JSP ) [ 158] [Active ] [ ] [ 60] Spring Web (2.5.6.SEC01) (required to use the Servlet : ContextLoaderListener) [ 159] [Active ] [ ] [ 60] spring-osgi-web (1.2.0) (required to allow Spring to load spring application context in an OSGI environment [ 165] [Active ] [ ] [ 60] x3s-web (1.0.0.SNAPSHOT) (WAR archive project) [ 169] [Active ] [ ] [ 60] Wicket (1.4.1) [ 170] [Active ] [ ] [ 60] Wicket IoC common code (1.4.1) [ 171] [Active ] [ ] [ 60] Wicket Spring Integration (1.4.1) [ 172] [Active ] [ ] [ 60] Wicket Extensions (1.4.1) [ 176] [Active ] [ ] [ 60] OPS4J Pax Web Extender - WAR (0.5.1) (extension required to allow the deployment of a WAR in the container) Remark : Wicket is only mandatory if the application use Wicket framework. I haven't checked for JSP pages if this config is fine. If it does not run, we need to add PAX Web JSP bundle It would be great to have an equivalent of the Spring servlet / OSGI class to allow a web application deployed in Apache Felix Karaf to load the blueprint configuration file :-) Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer ***************************** blog : http://cmoulliard.blogspot.com On Fri, Aug 28, 2009 at 10:25 AM, Guillaume Nodet <[email protected]> wrote: > This is not really to implement right now. The reason is that blueprint is > designed to work as an extender and can not be run outside of osgi. > I'm actually not sure how you would do that if you want to integrate > spring-dm inside a war in osgi ... I think we have the same problem here. > The OSGi EEG is working on that and I'm sure we'll have a solution that > will > work nicely with web apps deployed as bundles. > > For the non-osgi bits, the problem is that the Geronimo implementation does > not support working in a non-osgi environment, so it would be difficult > right now to start it from inside the web app. > > On Thu, Aug 27, 2009 at 10:06, Charles Moulliard <[email protected] > >wrote: > > > Hi, > > > > Spring OSGI - DM proposes in their package a OSGI class allowing a web > > application packaged as a WAR to load the Spring Application Context. > > > > Ex of a web.xml file > > > > <context-param> > > <param-name>contextClass</param-name> > > > > > <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value> > > <param-name>contextConfigLocation</param-name> > > <param-value>/WEB-INF/applicationContext.xml</param-value> > > </context-param> > > > > <listener> > > > > > <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> > > </listener> > > > > Do we have something equivalent for blueprint service ? > > > > Regards, > > > > Charles Moulliard > > Senior Enterprise Architect > > Apache Camel Committer > > > > ***************************** > > blog : http://cmoulliard.blogspot.com > > > > > > -- > Cheers, > Guillaume Nodet > ------------------------ > Blog: http://gnodet.blogspot.com/ > ------------------------ > Open Source SOA > http://fusesource.com >

