-
Notifications
You must be signed in to change notification settings - Fork 197
Dev: OSGi
As described here by Pentaho, most of the new features will be developed within the OSGi environment. Also some existing features such as marketplace have been converted to OSGi bundles. Meanwhile, webSpoon currently cannot use these features provided as OSGi bundles.
I'd like to make these features available to webSpoon.
According to the RAP Deverper's Guide, RAP can be deployed in different setups, including RWT standalone, and RAP with OSGi. The current setup of webSpoon is RWT standalone.
Spoon | webSpoon (RWT standalone) | webSpoon (RAP with OSGi) | |
---|---|---|---|
Implemented? | Yes | Yes | Not yet |
OSGi-compliant? | No | No | Yes |
Plugin registry thru | PDI-OSGI-Bridge | PDI-OSGI-Bridge | ? |
I am able to launch Apache Karaf by adding PDI-OSGI-Bridge and related dependencies.
As a result, the Marketplace plugin can now be used in webSpoon.
However, Apache Tomcat won't stop gracefully maybe because of the daemon threads related to Apache Karaf.
This known bug is the reason why the development branch (webspoon-6.1_karaf) cannot be merged to the branch webspoon-6.1.
Update [2/12/18]: webSpoon can launch Apache Karaf and use PDI Plugin OSGi bundles.
Some of the plugins are provided as OSGi bundles 1 2, and some of which serve HTTP service 3. They include PDI Repositories Plugin Core (repositories-plugin-core), Pentaho Marketplace (pentaho-marketplace-di), PDI File Open and Save Plugin (file-open-save), and Get Fields Plugin (get-fields).
The HTTP service is served at http://ip-address:9051/osgi
(the port may change), which is different from where webSpoon is served: http://ip-address:8080/spoon
.
Due to the security restriction by RAP/RWT 4, the domain and port of OSGi should be the same as webSpoon.
To comply with this restriction, a reverse proxy is being used so that a request http://ip-address:8080/spoon/osgi/*
is forwarded to http://ip-address:9051/osgi/*
.
Encoded slash (e.g., %2F for / and %5C for \) should be allowed at two places: Tomcat and Spring Security for some of the OSGi plugins work as expected.
For example, get-fields uses http://localhost:8080/spoon/osgi/cxf/get-fields/sample/file%3A%2F%2F%2Fhome%2Ftomcat%2F.kettle%2Fdata%2Fsamples%2Ftransformations%2Ffiles%2Fjsonfile.js/json/
.