Apache ACE together with Apache Felix embedded in

2019-06-09 03:21发布

问题:

I am wondering whether there is a more or less easy solution for the following situation. We have a web application that is using OSGI bundles. The application is deployed in Tomcat and embeds the Apache Felix framework as described in the documentation of Apache Felix. These are the prerequisites which cannot be changed.

Is it possible to use Apache ACE with this setup in order to distribute the bundles? The target.jar of Apache ACE comes with its own OSGI container which seems to make it hard to combine it with the one in our application. Is there an easy way to achieve this? The Apache ACE documentation is not that elaborate in this point.

回答1:

Yes, it is. Apart from the target.jar artifact, which includes the framework and the management agent, that management agent is also available as a separate bundle. That is what you need for your scenario.

Getting the management agent artifact is a matter of unjarring the target jar:

jar xf target.jar jar/org.apache.ace.agent.jar

Configuring the management agent is explained here:

http://ace.apache.org/user-doc/user-guide.html#running-a-target