OpenNTF / openliberty-domino

Open Liberty server embedded in Domino
Apache License 2.0
7 stars 3 forks source link

Investigate embedding API #8

Closed jesse-gallagher closed 3 years ago

jesse-gallagher commented 5 years ago

Liberty ships with an embedding API: https://www.ibm.com/support/knowledgecenter/en/was_beta_liberty/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/twlp_extend_embed.html

I've stayed away from this so far because it's good to have as distinct a runtime as possible to avoid causing trouble with nhttp. However, it could be that it'd provide some more-reliable control over the server, and it may be useful if the servers are ever initiated by an addin instead.

In early investigations, it's fiddly - it expects to find configuration files at locations relative to the com.ibm.ws.kernel.boot jar, making it awkward to embed inside a plugin. It seems like it's intended that you'd point at the WLP installation directory as the classpath for your running Java instance (or thread).

jesse-gallagher commented 3 years ago

It's proven quite beneficial to run this in a separate process. Though it may be useful some day to write a small Java program to surround the server, there's nothing right now that that would get us that using Process and providing some server extensions doesn't.