I’m working on a binding that depends on 3rd-party libraries which in turn make use of the
java.util.ServiceLoader facility. AFAIK, that doesn’t work right out of the box in an OSGi container, leading to
java.util.NoSuchElementExceptions when the service loader can’t find the service at runtime, despite being defined in the 3rd-party’s JAR at
If my analysis is correct so far, is there any example how to augment the 3rd-party code for use in an openHAB binding. IOW, are there any openHAB-specific constraints I need to take into account while implementing it? For instance, SPI Fly offers two distinct ways to do things; a OSGi spec-complaint way and a SPI Fly-specific way. Would both work for openHAB?
Likewise, dynamic or static weaving? Ok, openHAB provides support for dynamic weaving (
org.apache.aries.spifly.dynamic.bundle is active in my OH 3.0.1).
Also, can I expect SPI Fly to work within the
demo.app debug environment and in production/karaf, in the same way?