f2par0 commented on issue #577:
URL: https://github.com/apache/camel-karaf/issues/577#issuecomment-2626796924

   The way I fixed this issue locally  : in the start method of 
`HTTPTransportActivator` :  use the bus to create objects .
   Use ```<dependency>
               <groupId>org.ops4j.pax.web</groupId>
               <artifactId>pax-web-api</artifactId>
               <scope>provided</scope>
   <version>9.99.0</version>
           </dependency>``` dependency which reintroduced the HTTPService 
interface
   ```
   //don't use constructor, use the extension manager to register the object
   
           HTTPTransportFactory transportFactory =  
BusFactory.getDefaultBus().getExtension(HTTPTransportFactory.class);
           DestinationRegistry destinationRegistry = 
transportFactory.getRegistry();
   
           //FIXME : either we add this with dependency to pax web, or remove it
           HttpServiceTrackerCust customizer = new 
HttpServiceTrackerCust(destinationRegistry, context);
           httpServiceTracker = new ServiceTracker<>(context, 
HttpService.class, customizer);
           httpServiceTracker.open();
   
           context.registerService(DestinationRegistry.class.getName(), 
destinationRegistry, null);
           context.registerService(HTTPTransportFactory.class.getName(), 
transportFactory, null);
           //registers it also for the interface, as 
DestinationFactoryManagerImpl looks by DestinationFactory
           context.registerService(DestinationFactory.class.getName(), 
transportFactory, null);
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to