JBoss.orgCommunity Documentation

Chapter 3. JBoss OSGi Runtime

3.1. Overview
3.2. Features
3.3. Runtime Profiles

The JBoss OSGi Runtime is an OSGi container onto which components, services and applications can be deployed.

Preconfigured profiles, contain OSGi bundles that logically work together. A profile can be bootstrapped either as a standalone server or embedded in some other environment. With a startup time of less than 600ms, the runtime can be easily be bootstrapped from within plain JUnit4 test cases.

The JBoss OSGi Runtime has an integration layer for the underlying OSGi framework.

Through local and remote management capabilities the JBoss OSGi Runtime can be provisioned with new or updated bundles. Similar to JBossAS it supports hot-deployment by dropping bundles into the 'deploy' folder. Management of the runtime is provided through a Web Console

JBoss OSGi comes with an implementation of Blueprint Service, which standardizes a POJO programming model without much "pollution" of OSGi specific API.

Great care has been taken about testability of deployed components and services. The Arquillian Test Framework allows you to write plain JUnit tests that do not need to extend any specific test base class. Access to the Runtime has been abstracted sufficiently that you can run the same test case against an embedded (bootstrapped from within the test case) as well as a remote instance of the Runtime. You can run your OSGi tests from Maven, Ant, Eclipse or any other test runner that supports JUnit4.

The current JBoss OSGi Runtime feature set includes

A runtime profile is a collection bundles that logically work together. The OSGi runtime configuration contains the list of bundles that are installed/started automatically. You can start create you own profile by setting up a new directory with your specific set of bundles.

A runtime profile can be started using the -c comand line option.

$ bin/run.sh -c minimal
=========================================================================

  JBossOSGi Bootstrap Environment

  OSGI_HOME: /home/tdiesler/jboss-osgi-1.0.0.Beta9/runtime

  JAVA: /usr/java/jdk1.6/bin/java

  JAVA_OPTS: -Dprogram.name=run.sh ...

=========================================================================

14:14:38,355 INFO  JBossOSGi Framework Core - 1.0.0.Alpha8
14:14:38,422 INFO  Bundle STARTED: system.bundle:0.0.0
14:14:38,766 INFO  Bundle STARTED: org.apache.felix.log:1.0.0
14:14:38,816 INFO  Bundle STARTED: jboss-osgi-common:1.0.6
14:14:38,867 INFO  Bundle STARTED: jboss-osgi-hotdeploy:1.0.8
14:14:38,870 INFO  JBossOSGi Runtime booted in 0.514sec
    
Minimal Profile

The 'minimal' profile provides logging and hot-deployment.

The following bundles are installed:

  • jboss-osgi-common.jar - JBoss OSGi common services
  • jboss-osgi-hotdeploy.jar - JBoss OSGi hot deployment service
  • org.apache.felix.log.jar - Apache LogService
  • org.osgi.compendium.jar - OSGi compendium API
Default Profile

The 'default' profile extends the 'minimal' profile by JNDI and JMX

These additional bundles are installed:

  • jboss-osgi-common-core.jar - JBoss Common Core functionality
  • jboss-osgi-jmx.jar - JBoss OSGi JMX service
  • jboss-osgi-jndi.jar - JBoss OSGi JNDI service
  • org.apache.aries.jmx.jar - Apache Aries JMX services
  • org.apache.felix.configadmin.jar - Apache Config Admin service
  • org.apache.felix.eventadmin.jar - Apache Event Admin service
Web Profile

The 'web' profile extends the 'default' profile by HttpService and ConfigAdmin

These additional bundles are installed:

  • jboss-osgi-http.jar - JBoss OSGi HttpService
  • jboss-osgi-webapp.jar - JBoss OSGi WebApp Support
  • jboss-osgi-webconsole.jar - JBoss OSGi Web Console
All Profile

The 'all' profile extends the 'web' profile by SAX/DOM, JAXB

These additional bundles are installed:

  • arquillian-osgi-bundle.jar - Arquillian test support
  • jboss-osgi-jaxb.jar - JAXB support
  • jboss-osgi-jta.jar - JTA support
  • jboss-osgi-xerces.jar - Apache Xerces support
  • jboss-osgi-blueprint.jar - Blueprint Container support