oscerd opened a new issue, #744:
URL: https://github.com/apache/camel-karaf/issues/744

   Raised by @jbonofre during the review of #739, flagged there because the 
method is in that diff but out of scope for it.
   
   `OsgiTypeConverter.ensureTrackerOpen()`:
   
   ```java
   private synchronized void ensureTrackerOpen() {
       if (!trackerOpened) {
           tracker.open();
           trackerOpened = true;
       }
   }
   ```
   
   If `tracker.open()` throws, `trackerOpened` stays `false`, so a later call 
retries — but `ServiceTracker.open()` assigns its `tracked` field *before* 
calling `trackInitial()`. The retry therefore sees the tracker as already open 
and returns early, and `trackInitial()` never runs again. The initial 
`TypeConverterLoader` services that had not been processed when the first call 
failed are then never tracked at all.
   
   `addingService` can throw `RuntimeCamelException` out of `trackInitial()` 
when a loader's `load()` fails, so a single bad loader present at startup can 
silently strand every loader after it in the initial set. The failure is quiet: 
the context comes up, and conversions that depended on the stranded loaders 
fail later with `NoTypeConversionAvailableException` and nothing pointing at 
the cause.
   
   Worth deciding what the right behaviour is rather than patching the flag — 
options include not letting one loader's failure abort `trackInitial()`, or 
re-opening a fresh `ServiceTracker` on retry.
   
   ---
   _Claude Code on behalf of Andrea Cosentino_
   


-- 
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