[JBAS-8668] All OSGi bundle install code paths must go through deployer chain
In AS7 there are several options available to install an OSGi bundle. The most obvious one is bundle hot-deployment in the 'deployements' folder. This would go through the server management API and make the OSGi deployment part of the domain data model. Hence it'd show up in the AS7 management agent, once that is available.
Thrird party provisioning systems would not use the AS7 management API. Instead, they use
depending on whether they install the Bundle locally or remote. Our OSGi management console and Arquillian embedded OSGi use the former. Our remote OSGi test framework(s) use the latter.
I now modified the Framework such that all bundle deployment/undeployment is intercepted at the lowest commen integration point and delegated to a pluggable DeployerService. An implementation of this service is provided by the AS7/OSGi integration layer.
In AS7 all Bundle deployments are now routed through the server management API and are not any more treated differently to non-OSGi deployments. The same is true for Bundle.uninstall(). Modules that are registered with the OSGi layer can be undeployed using the standard OSGi uninstall API or more generally can be managed through the OSGi webconsole. Alternatively, if an AS7 deployment is undeployed through the server management API, there are OSGi related deployment services that make the call to the OSGi layer when the DeploymentService is REMOVED
This extension point may also be interesting for 3rd party integrators (e.g. Tibco). It uniquely offers VirtualFile abstraction for OSGi bundles.
Please pull from https://github.com/jbosgi/jboss-as/tree/jbas8668