directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John E. Conlon" <>
Subject [OSGi] Status - Commons and Mina Support
Date Tue, 21 Nov 2006 21:15:28 GMT
As part of the ongoing effort to update support for OSGi ApacheDS and
Mina I have committed several OSGi projects to the sandbox/jconlon.
These projects provide:
  all the need pieces for OSGi Mina 
  and lay the initial foundations for a full featured OSGi ADS backend
that I will be committing next week.

Please check out these projects, build them and try them out in an OSGi
runtime and let me know what you think.  If you have questions I will do
my best to answer them.

If you have not worked with OSGi previously and want to get started
goto: and read the documentation, download
sources, and build.

(Have tested the committed projects within the felix and equinox OSGi

1. osgi-commons projects
Both ADS and Mina depend on third party libraries.  To offer ADS and
Mina OSGi support these libraries must also support OSGi and be
installed and their packages exported on the OSGi runtime. To facilitate
this support (in an interim basis until the Felix commons project is
initiated or the libraries are made available by their authors as osgi
bundles) within the sandbox/jconlon/osgi-commons directory you will find
simple pom based projects for creating annotated jars (aka OSGi bundles)
antlr, commons-collections, commons-lang, and jzlib. 

Note on the maven Plugin:
These projects utilize the new org.apache.felix maven-bundle-plugin to
do the wrapping/annotating of the jars.  This plugin offers some unique
features over the first generation maven-osgi-plugin so if you have used
the Enrique's original plugin this one will take a little time getting
used to.

To build all the commons projects: 
cd sandbox/jconlon/osgi-commons
mvn clean install

2. osgi-services

a, logging-service 
Support for an OSGi ApacheDS and Mina will require the slf4j logging
packages to be made available on the OSGi runtime. Unfortunately since
not all library authors have adopted slf4j, some like Spring-OSGi
require commons-logging. So in order to provide the logging packages
that we and our likely functional collaborators will need -

Within the sandbox/jconlon/osgi-services/logging-service directory you
will find an OSGi Bundle offering an implementation of the OSGi
LogService, library support for Apache slf4j, and slf4j support for
Apache commons-logging. All services are based on the slf4j simple

Configuring logging in an OSGi runtime:
To change the logging configuration from the defaults, create/edit the
configuration properties in the <osgiruntimeWorkingDir>/
conf/ file, then stop and restart the bundle.

b. logging-service-integration-test
This is the OSGi integration-test project for logging-service. This
project builds a OSGi environment, loads various bundles, and tests the
logging-service is doing it's thing. It is strictly optional and will
require downloading and building of the Spring-OSGi sources.

3. osgi-mina

a. integration-osgi
The pom based project in sandbox/jconlon/osgi-mina/integration-osgi is
an OSGi annotated jar/bundle for Mina as requested in

For it to resolve in an OSGi it will require the following packages to
be exported in the runtime:

com.jcraft.jzlib  (see #1. above)
org.slf4j, (see #2.a above)

The springframework packages bundled for OSGi are provided in the Spring
OSGi sub project:

b. mina-osgi-example
The sandbox/jconlon/osgi-mina/mina-osgi-example is an example of a mina
osgi server application.  Based on the mina chat example this
application utilizes Spring-OSGi. The beauty of Spring-OSGi (available
in spring 2.1) is that with it we can create our beans and provide the
wiring without any dependencies on OSGi or for that matter Spring. Cool
Project also includes a spring-container server client testcase.

c. mina-osgi-example-integration-test
This is the OSGi integration-test project for mina-osgi-example. It is
strictly optional and will require downloading and building of the
Spring-OSGi sources at to get it to
build and run.

How does it work?
This project builds an OSGi environment, loads Spring-OSGi and bundles
required by Mina and the mina-osgi-example and then starts the mina-
osgi-example. The Spring-OSGi will detect the start of the mina-osgi-
example and find its spring configuration, wire the beans and start the
server. The testcase will bring up a chat client and bounce some
messages at it.

feedback, comments?

View raw message