Skip to end of metadata
Go to start of metadata


This chapter takes you through the first steps of getting JBoss OSGi and provides the initial pointers to get up and running.

Download the Distribution

Starting from WildFly-8.0.0.Alpha3, OSGi support is not part of WildFly any more. JBoss OSGi project provides examples, documentation and the subsystem that adds OSGi functionality to WildFly.

JBoss OSGi is distributed as an IzPack installer archive. The links to the installer are available on the project homepage.

WildFly can be downloaded from the WildFly download area.

Running the Installer

To run the Project Distribution installer execute the following command:

The installer first shows a welcome screen

Then you select the installation path for the JBoss OSGi distribution. This is the directory where you find binaries, sources, examples and documentation.

You can then select whether you want to install the OSGi subsystem into an existing WildFly build

Activating the Subsystem

By default the OSGi subsystem is activated lazily. It means that the framework will not start up unless you deploy an OSGi bundle. You can activate the OSGi subsystem explicitly by setting the activation property to 'eager'

It is also not part of the default configuration. Instead you can use the provided standalone-osgi.xml configuration.

When you start up WildFly you should see something like this

Provided Examples

The JBoss OSGi project distribution comes with a number of examples that you can build and run in an OSGi standalone environment (i.e. without WildFly integration).

  • blueprint - Basic Blueprint Container examples
  • configadmin - Configuration Admin example
  • core - Simple OSGi examples (start here)
  • ds - Declarative Services examples
  • eventadmin - Event Admin examples
  • jmx - Standard and extended JMX examples

Additional to that there are a number of integration examples that document and verify the WildFly integration

  • cdi - CDI integration examples
  • ear - Bundles in enterprise archives examples
  • ejb3 - EJB3 integration examples
  • http - HttpService examples
  • interceptor - Intercept and process bundle metadata
  • jaxb - XML binding examples
  • jaxp - SAX/DOM parser examples
  • jaxrs - REST integration examples
  • jaxws - WebService integration examples
  • jndi - Naming integration examples
  • jpa - Persistence integration examples
  • jta - Transaction integration examples
  • resource - Resource injection examples
  • webapp - WebApplication (WAR) examples

For more information on these examples, see the Provided Examples section.

Bundle Deployment

Bundle Deployment from the command-line is supported through the CLI console and through the web-based Management Console.

It is also possible to deploy bundles by dropping them in the deployments folder. This will automatically resolve and start the bundle when possible. Bundles can be started explicitly through the CLI or the web console.

When a bundle is installed and started, messages like the following can be seen from the server console.

Managing installed Bundles

WildFly comes with a Web Console. After startup you can point your browser to http://localhost:9990/console.

The Web Console can be used to install, start, stop and uninstall bundles. Additionally, the web console can be used to activate the framework and manage the current framework Start Level.

Felix Web Console

For more detailed management operations you can also install the Felix Web Console

In WildFly 8.x you add this capability

The console is then accessible on: http://localhost:8080/system/console

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.