I also suspect that there could be a timing issue on startup but was not yet able to reproduce. When I had such errors the reason was something different. Can you create a simple project that shows the problem?
Christian 2016-07-18 17:44 GMT+02:00 Benson Margulies <[email protected]>: > I should say that the problems I've had even before I started changing > thing were that startup issues: one of them the problem of the > transport not being there when things went to find it. > > > > On Mon, Jul 18, 2016 at 11:41 AM, Benson Margulies <[email protected]> > wrote: > > Until recently, I didn't have all the busses I was supposed to have. A > > few weeks ago, I tried to add them, and I got a problem wherein some > > of my services would just disappear. I'll let you know soon if my > > current (DS1.3) solution does the job. > > > > > > On Mon, Jul 18, 2016 at 11:37 AM, Christian Schneider > > <[email protected]> wrote: > >> One bus per bundle should be enough. I guess we could also do this in > DSOGi. > >> > >> What you have looks good generally. Do you get any error? > >> > >> Christian > >> > >> > >> On 18.07.2016 17:31, Benson Margulies wrote: > >>> > >>> I'm hoping for a response from Christian. > >>> > >>> I don't think that CXF-DOSGI and I are ready for each other yet -- I > >>> can't be depending on a 2.0-SNAPSHOT. So I'm looking to clean up my > >>> existing code that launches CXF JAX-RS services via the usual CXF API > >>> from inside OSGi bundles from inside of Karaf 4.0.x. > >>> > >>> Below is a typical launch. To put this into context, cxfBus is an > >>> @Reference to a DS @Component with scope set to BUNDLE. The activator > >>> in the component creates a new bus and calls makes sure that it has > >>> the right class loader. > >>> > >>> > >>> > bus.setExtension(context.getBundleContext().getBundle().adapt(BundleWiring.class).getClassLoader(), > >>> ClassLoader.class); > >>> > >>> I took a look inside of CXF-DOSGI to improve my chances of getting > >>> this stuff right, and I didn't see the extension getting set. I also > >>> saw an entire bus for each service, not just one for each bundle. > >>> > >>> Am I missing something? > >>> > >>> > >>> > >>> JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean(); > >>> sf.setBus(cxfBus.bus()); > >>> sf.setProvider(new JacksonJaxbJsonProvider(JsonUtils.getObjectMapper(), > >>> JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS)); > >>> sf.setProvider(new JsonExceptionMapper()); > >>> sf.setProvider(new WebApplicationExceptionMapper()); > >>> sf.setProvider(new GenericExceptionMapper()); > >>> sf.setServiceBeans(Collections.singletonList(this)); > >> > >> > >> > >> -- > >> Christian Schneider > >> http://www.liquid-reality.de > >> > >> Open Source Architect > >> http://www.talend.com > >> > -- -- Christian Schneider http://www.liquid-reality.de <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de> Open Source Architect http://www.talend.com <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>
