Is OSGi fundamentally incompatible with JSR-223 Scripting Language Discovery?

后端 未结 3 1343
生来不讨喜
生来不讨喜 2020-12-05 21:13

I\'ve recently written a small specialist scripting language and used the Maven to export an OSGi compliant bundle that also exports a service descriptor into the \"ME

3条回答
  •  余生分开走
    2020-12-05 21:25

    Just to chime in that there is a standard general solution to consuming these types of services in an OSGi environment, as ScriptEngineFactory is not the only such case. It is a part of the OSGi Enterprise spec. and the reference implementation can be found here: http://aries.apache.org/modules/spi-fly.html

    It is trivial to recreate the functionality of the Apache Spring classes via this mechanism, and imo this method is far cleaner and more sensible, but I do understand the desire to avoid reimplementing the wheel so to speak.

提交回复
热议问题