Overview
The JBoss OSGi framework is fully integrated into the WildFly Application Server. OSGi bundles can be deployed like any other deployment that is supported by WildFly. Hot deployment is supported by dropping an OSGi bundle into the 'deployments' folder. Management is supported through the Command Line Console or the web-based Management Console.
OSGi components can interact with non OSGi services that are natively provided by WildFly. This includes, but is not limited to, the Transaction Service and Naming Service (JNDI).
Standard OSGi Config Admin functionality is supported and integrated with the WildFly domain management layer.
By default the OSGi subsystem is activated on-demand and not part of the standard configuration. When configured and when there is an OSGi bundle deployment the subsystem activates and the respective OSGi services become available.
Configuration
The OSGi subsystem is configured like any other subsystem in the standalone/domain XML descriptor. The configuration options are:
<subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">
<properties>
<property name="org.jboss.osgi.system.modules.extra">org.apache.log4j</property>
<property name="org.osgi.framework.system.packages.extra">org.apache.log4j;version=1.2</property>
<property name="org.osgi.framework.startlevel.beginning">1</property>
</properties>
<capabilities>
<capability name="javax.servlet.api:v25"/>
<capability name="javax.transaction.api"/>
<capability name="org.apache.felix.log" startlevel="1"/>
<capability name="org.jboss.osgi.logging" startlevel="1"/>
<capability name="org.apache.felix.configadmin" startlevel="1"/>
<capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>
</capabilities>
</subsystem>
...
<subsystem xmlns="urn:jboss:domain:configadmin:1.0">
<configuration pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">
<property name="manager.root">jboss-osgi</property>
</configuration>
</subsystem>
For more details on WildFly configuration see WildFly8 Documentation.
Features
The current JBoss OSGi feature set in AS includes
Compatibility Matrix
|
WildFly-8.0.0.Alpha2
|
JBOSGi-2.0.0
|
yes
|