On Wed, Jun 30, 2010 at 11:33, Charles Moulliard <[email protected]> wrote: > If we cannot really use this option of Spring, which mechanism do you > propose to start a bundle (= camel routes using cxf) after the bundle > to which it depends (ex : Apache CXF for web services) is started ?
Well, i guess you can. As I said I don't recall exactly what our problem was. > > Without such mechanism, we have the existing problem that some spring > context are started while spring CXF is not yet started. On the > console, we see that all the bundles are active and their spring > status is "started" but when we call the web service, we get a HTTP > 404 error. After restarting the server a couple of times, this problem > disapears and we can call the web service. I suppose your problems come from the flaws in spring-dm I described at http://gnodet.blogspot.com/2010/03/spring-dm-aries-blueprint-and-custom.html . In particular, custom namespaces are taken into account when the bundle is started, but there's no way in osgi to express a dependency on a started bundle. The only way with spring-dm is to change the start level to make sure the cxf bundle is started before the bundles that use its namespace afaik. > > Client cannot depend on a random mechanism to be sure that its > platform is operational !! > > KR, > > Charles Moulliard > > Senior Enterprise Architect (J2EE, .NET, SOA) > Apache Camel - ServiceMix Committer > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Blog : http://cmoulliard.blogspot.com | Twitter : > http://twitter.com/cmoulliard > Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: cmoulliard > > > > On Wed, Jun 30, 2010 at 11:21 AM, Guillaume Nodet <[email protected]> wrote: >> Yes, but I think there are some drawbacks. Unfortunately, I don't >> recall exactly, but all servicemix bundles were configured to start >> synchronously at some point and we had to revert back to being >> asynchronous for some reason. >> >> On Wed, Jun 30, 2010 at 11:02, Adrian Trenaman <[email protected]> wrote: >>> Hi Guillaume, Charles, >>> >>> Can't we just add the appropriate Spring-Context headers to the OSGi >>> manifest to turn on synchronous startup of the bundles? >>> >>> See >>> http://static.springsource.org/osgi/docs/1.2.0/reference/html/app-deploy.html#app-deploy:headers >>> >>> Best, >>> Ade. >>> >>> Open Source Integration: http://fusesource.com >>> >>> On 30/06/2010 09:58, Guillaume Nodet wrote: >>>> >>>> The problem isn't that the start level is not used. It is actually >>>> used by the framework. >>>> The problem is that spring apps are started asynchronously. >>>> If you have dependencies between bundles start order, you should >>>> usually use service dependencies to model those. >>>> >>>> On Wed, Jun 30, 2010 at 10:51, Charles Moulliard<[email protected]> >>>> wrote: >>>> >>>>> >>>>> Hi, >>>>> >>>>> Does anybody knows if there is a way to define the start up order of >>>>> the Spring when we have spring xml files defined in >>>>> META-INF/spring/*.xml ? >>>>> The bundle start level is not taken into account in this case !! >>>>> >>>>> KR, >>>>> >>>>> Charles Moulliard >>>>> >>>>> Senior Enterprise Architect (J2EE, .NET, SOA) >>>>> Apache Camel - ServiceMix Committer >>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>> Blog : http://cmoulliard.blogspot.com | Twitter : >>>>> http://twitter.com/cmoulliard >>>>> Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: >>>>> cmoulliard >>>>> >>>>> >>>> >>>> >>>> >>> >> >> >> >> -- >> Cheers, >> Guillaume Nodet >> ------------------------ >> Blog: http://gnodet.blogspot.com/ >> ------------------------ >> Open Source SOA >> http://fusesource.com >> > -- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ Open Source SOA http://fusesource.com
