directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John E. Conlon" <jcon...@verticon.com>
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:
http://incubator.apache.org/felix/ and read the documentation, download
sources, and build.

(Have tested the committed projects within the felix and equinox OSGi
runtimes.)

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)
for 
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
implementation. 

Configuring logging in an OSGi runtime:
To change the logging configuration from the defaults, create/edit the
configuration properties in the <osgiruntimeWorkingDir>/
conf/log4j.properties 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.
http://www.springframework.org/osgi


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
http://issues.apache.org/jira/browse/DIRMINA-27

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)
org.springframework.beans.factory,
org.springframework.beans.factory.config, 
org.springframework.core.io, 
org.springframework.util

The springframework packages bundled for OSGi are provided in the Spring
OSGi sub project: http://www.springframework.org/osgi

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
eh?
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 http://www.springframework.org/osgi 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?
John



Mime
View raw message