Re: Spring-DM web and pax web extender bundle processing order in 2.2.7

2012-06-26 Thread Guillaume Nodet
If you use a spring web app, do you really need to use spring-dm in addition ? Why don't you just use the spring app ? On Tue, Jun 26, 2012 at 1:23 AM, Raman Gupta rocketra...@gmail.com wrote: On 06/25/2012 03:21 AM, Guillaume Nodet wrote: That's a quite big problem and I'm not really aware of

Re: Spring-DM web and pax web extender bundle processing order in 2.2.7

2012-06-26 Thread Raman Gupta
On 06/26/2012 07:17 AM, Guillaume Nodet wrote: If you use a spring web app, do you really need to use spring-dm in addition ? Why don't you just use the spring app ? I'm not sure what you mean... Spring-DM is what ties in the OSGi microservices into the web bundle's Spring context, right? How

Re: Spring-DM web and pax web extender bundle processing order in 2.2.7

2012-06-26 Thread Guillaume Nodet
If you want to use spring-dm and spring-mvc, you want to look at http://static.springsource.org/osgi/docs/1.1.0-m2/reference/html/web.html There's a special application context class designed for this it seems: org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext

Re: Spring-DM web and pax web extender bundle processing order in 2.2.7

2012-06-26 Thread Raman Gupta
On 06/26/2012 10:56 AM, Guillaume Nodet wrote: If you want to use spring-dm and spring-mvc, you want to look at http://static.springsource.org/osgi/docs/1.1.0-m2/reference/html/web.html There's a special application context class designed for this it seems:

Re: Spring-DM web and pax web extender bundle processing order in 2.2.7

2012-06-25 Thread Guillaume Nodet
That's a quite big problem and I'm not really aware of any way to control the extender execution order. The reason is that each extender can work synchronously or asynchronously and there's no coordination between them, there's not even a way to specify such a thing. I can only see two ways out:

Re: Spring-DM web and pax web extender bundle processing order in 2.2.7

2012-06-25 Thread Achim Nierbeck
Hi I just can second Guillaume here, there is only one more thing that crosses my mind. Pax Web needs to support Injecting OSGi Services into the Servlets, see also [1]. But as usual this kind of stuff is needed much earlier then implemented :) regards, [1] -

Re: Spring-DM web and pax web extender bundle processing order in 2.2.7

2012-06-25 Thread Raman Gupta
Thanks Guillaume and Achim... I will investigate the manual synchronization route. Does Pax-web initialize each servlet synchronously? If so, I can create a dummy servlet that initializes before the main servlet that can wait for the initialization of the Spring context. I also found this post by

Re: Spring-DM web and pax web extender bundle processing order in 2.2.7

2012-06-25 Thread Guillaume Nodet
I think Peter's solution is a nice one, as spring (and blueprint) has the ability to wait until all services are satisfied before actually creating the full spring app. That would only work if you need it that way though (i.e. spring app started after the web app). On Mon, Jun 25, 2012 at 4:14

Re: Spring-DM web and pax web extender bundle processing order in 2.2.7

2012-06-25 Thread Raman Gupta
I'm looking at the second solution below (manual synchronization). The Spring side is easy -- I can create a bean in the context with an init-method attribute that therefore knows when the Spring context has been created. On the servlet side I have created a common servlet called

Spring-DM web and pax web extender bundle processing order in 2.2.7

2012-06-24 Thread Raman Gupta
I just upgraded to Karaf 2.2.7 from Karaf 2.2.4 and noticed that now the Spring DM web extender and pax web extender's no longer run in the correct order. The Spring-DM extender needs to process the bundle *before* the PaxWeb extender, since until the app context is created by Spring-DM it is a