Not really. I'm embedding vertx core in an OSGi server runtime like
we've done for other types of server including Tomcat, Jetty, and the
OSGi HttpService. This might seem an odd thing to do from your
perspective, but it makes a lot of sense from mine. ;-) I think the
requirements this drives in vertx should be fairly general and be
useful when vertx is embedded in other environments.
I work on the Virgo project which provides a fully-fledged server
runtime constructed from OSGi bundles. To embed a server in this
runtime, we typically wrap the relevant JARs in OSGi bundles (which
usually amounts to little more than augmenting META-INF/MANIFEST.MF
using one of the tools available for that purpose). Then we have to
worry about class and resource loading to make sure this works ok in
the OSGi environment with its graph of class loaders.
So I took the vertx core JAR, converted it into an OSGi bundle, and
got it running in Virgo along with its dependencies (netty, jackson-
core/mapper) each running as a separate OSGi bundle.
The aim is then to be able to deploy vertx applications, packaged in
OSGi bundles, into Virgo and have the applications use vertx in a
fairly normal way. I say fairly normal, as the modular structure lets
you factor out some of the boilerplate code from the application and
leave the application as essentially an HTTP request handler.
(Another possibility, which I won't go into now is to allow "vanilla"
vertx applications to be deployed into this system, but that's another
kettle of fish.)
>
> Perhaps if you explain a bit more about what you're aiming for, I can
> point you in the right direction.
I hope the above explanation is sufficient? Maybe a demo would help?
>
> The path adjustment only really means something in the context of the
> container. It basically allows modules to run from their module install
> directory as if their working directory was there.
Since the application in Virgo is an OSGi bundle with its own class
loader I need to intercept the file lookup to make it use the
application bundle's class loader. The only way I found to do this was
to provide a path adjustment, but I'm open to better alternatives.