This wiki is aiming to discuss how to support OSGI based service component development in STP.

+

This wiki is aiming to discuss how to support users to develop OSGI based service component in STP.

+

Johnson Ma, Dec 27, 2007

Johnson Ma, Dec 27, 2007

== Introduction ==

== Introduction ==

As more and more Middleware servers becomes OSGI based. We need to support users

As more and more Middleware servers becomes OSGI based. We need to support users

−

to create service component in the format of OSGI bundle in an Service Oriented Approach.

+

to create service component in the format of OSGI bundle following the Service Oriented Approach.

−

We will use [http://servicemix.apache.org/home.html ServiceMix] 4.0 as a reference SOA runtime here, which is based on [http://felix.apache.org/site/index.html Apache Felix] OSGI implementation.

+

We plan to use [http://servicemix.apache.org/home.html Apache ServiceMix 4.0] as a reference SOA runtime here, which is based on [http://felix.apache.org/site/index.html Apache Felix] OSGI implementation.

== Existing OSGI tooling ==

== Existing OSGI tooling ==

Line 34:

Line 35:

== How to create a OSGI service component ==

== How to create a OSGI service component ==

+

=== OSGI Runtime ===

+

Setup an extension point for users to assign osgi runtime to a osgi bundle project.

+

+

=== OSGI Bundle project wizard ===

+

In the current Eclipse env, users can create Elipse plugin or osgi bundle project from one PDE project wizard.

+

IMHO, it will be better if we provide dedicated project wizard, such as project wizard to create "ServiceMix OSGI bundle".

+

+

=== Manifest Editor===

+

Helping users to configure:

+

*bundle dependencies

+

*classpath exporting

+

*osgi properties in manifest file

+

+

We will reuse the Manifest editor from PDE here with some customization.

+

+

[[Image:Osgi manifest editor.PNG]]

+

+

When users click the 'Add...' button, the default behavior for PDE will list all plugins under eclipse/plugins dir.

+

+

We need to change to show all the bundles installed in the selected OSGI runtime.

+

+

== How to deploy OSGI component to runtime ==

== How to deploy OSGI component to runtime ==

There maybe two ways for the deployment:

There maybe two ways for the deployment:

−

I prepare the WTP based solution. since it can better integrate with SOAS in stp.

+

*Extending the WTP server framework for osgi runtime

+

*or extending the PDE osgi.frameworks

+

+

I prefer the WTP based solution. since it can be better integrated with SOAS in stp.

How to create a OSGI service component

OSGI Runtime

Setup an extension point for users to assign osgi runtime to a osgi bundle project.

OSGI Bundle project wizard

In the current Eclipse env, users can create Elipse plugin or osgi bundle project from one PDE project wizard.
IMHO, it will be better if we provide dedicated project wizard, such as project wizard to create "ServiceMix OSGI bundle".

OSGI Console in eclipse

Since we are starting ServiceMix using WTP server framework. The OSGI console should show in Eclipse console view.
Then users can send commands, such as ss, start, stop, shutdown...etc.

Below is the console view for Eclipse Equinox, Apache Felix console should show in the similar way.

User Scenarios

Spring metadata editor

The ServiceMix runtime is based on the Spring framework. We should looking into how to help users to create spring configuration --- a Spring metadata editor. (reuse editor from SpringIDE?)

Tasks List

In the end, let's summarize the tasks suggested by this wiki:
(Since the ServiceMix 4.0 is not released yet. we can build the OSGI tooling base on the Spring runtime for now. It shouldn't take much effort to support ServiceMix runtime later on.)

ID

Description

Comments

1

WTP Server extension for ServiceMix 4.0

to support start/stop osgi runtime within eclipse

2

Project Wizard to create "ServiceMix OSGI Bundle"

or just create any osgi bundle?

3

OSGI Runtime Extension Point

*Unless the current runtime extension, we need to get bundles installed instead of jars for classpath:

Also need to find out exported packages from each bundle to help users to setup classpath

4

PDE Manifest Editor customization

Let users to setup dependency according to the selected osgi runtime

5

OSGI Facet?

Do we need to define OSGI Facet?

6

Spring Metadata Editor

To editor Spring configuration files. Reuse the editor from SpringIDE?