currently the following works but it's kind of a long and ugly hack (that is actually not supposed to work) :
(Java::JavaClass.for_name('org.killbill.billing.osgi.bundles.jruby.JRubyPlugin') rescue false)
some viable alternatives to use :
KILLBILL_VERSION (or KILLBILL_PLATFORM_VERSION or KILLBILL_SERVER_VERSION) constant that would reflect the server's version
dis-advantages - maybe too similar to gem Killbill::VERSION ?
(also I'm not sure how to retrieve the version - parsing the pom.properties in jar is an option but I guess OSGi should now that already)
introduce and use ENV['KILLBILL_ENV'] == 'production' - coupling to a single ENV value seems limiting for the future
depends on JRubyPlugin itself as it would need to expose the constant early-on while setting up the JRuby embed container.
this could prove useful for plugins (despite the configuration .yml being used less), desired sample :
currently the following works but it's kind of a long and ugly hack (that is actually not supposed to work) :
(Java::JavaClass.for_name('org.killbill.billing.osgi.bundles.jruby.JRubyPlugin') rescue false)
some viable alternatives to use :
KILLBILL_VERSION
(orKILLBILL_PLATFORM_VERSION
orKILLBILL_SERVER_VERSION
) constant that would reflect the server's versiondis-advantages - maybe too similar to gem
Killbill::VERSION
? (also I'm not sure how to retrieve the version - parsing the pom.properties in jar is an option but I guess OSGi should now that already)ENV['KILLBILL_ENV'] == 'production'
- coupling to a single ENV value seems limiting for the futuredepends on
JRubyPlugin
itself as it would need to expose the constant early-on while setting up the JRuby embed container.... from https://github.com/killbill/killbill-plugin-framework-ruby/issues/37#issuecomment-94719888