I think there's no relationship between the processing that PAX Web
and Spring DM do in this case.
For the servlet to access the BundleContext, I would think the best
way would be to have a bean defined in the spring xml config file that
receives a reference to the BundleContext and store it in a static
variable that could be accessed by the servlet.
However you'd have no control over which object would be instanciated first.
A better way may be to not use pax web extender and simply use your
spring-dm files to create the servlet and expose them in the osgi
registry (not using the WEB-INF/web.xml file), it should work better.
Have you asked the Pax Web guys about that ? I'm sure they'll have better ideas.

On Thu, Apr 2, 2009 at 11:59, Charles Moulliard <[email protected]> wrote:
> Hi,
>
> I try to figure out how SMX Kernel + Spring DM + Felix + PAX works together
> during the deployment of a WAR bundle using the command
>
> install mvn:org.apache.camel/example/1.0-SNAPSHOT/war
>
> For the simulation, let's say that we have a WAR bundle containing  under :
> - META-INF/spring/ directory a service-osgi.xml spring config file. The
> service-osgi.xml file contains local beans (that spring must instantiated)
> and a reference (osgi:reference class="") to bean exposed as a service by
> another OSGI bundle
> - WEB-INF/web.xml.
>
> Steps : command install --> PAX --> Felix --> Spring DM --> PAX Web --> ????
>
> Question : When the bundle is installed and started, How can a Servlet have
> access to the BundleContext class of Spring and can retrieve its local
> spring beans or beans exposed as OSGI:service in another bundle ?
>
> Regards,
>
> Charles
> SOA Architect
>
> blog: http://cmoulliard.blogspot.com
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to