>Steve Brewin wrote:
>
> Serge Knystautas wrote:
>
<snipped>
>
> For my part, I'm planning to knock up some OSGi examples to
> understand the
> correlation between what OSGi provides and what we need.
>
Some initial results (restating the obvious for you OSGi aficionados out
there).

OSGi could provide us with a set of useful basic functionality and a way of
exposing James' functionality to the rest of the world in a standards based
manner.

Each of the OSGi layers - Security, Module, Life Cycle and Service - could
potentially be of benefit. However, OSGi alone is not a solution.

The OSGi Module layer essentially defines a packaging system for components
called bundles and how bundles can be assembled together. What it does not
do is define how the class instances of a bundle are assembled; when and how
class instances within a bundle obtain instances of the classes they
require. This is totally open. Each bundle is free to use its own strategy.
It might be some form of DI (dependency injection), use service lookup or a
mishmash of many techniques.

As has been suggested by myself and others, if we want to consisently use a
chosen strategy, such as some form of IOC, an extra layer must be exposed
for the use of each bundle that implements this strategy.

The OSGi Life Cycle layer similarly defines a set of life cycle states -
INSTALLED, RESOLVED, STARTING, ACTIVE, STOPPING, UNINSTALLED - operative at
the bundle level. It does not define the part class instances of a bundle
play in the life cycle. Again, the solution would be to expose an extra
layer for the use of each bundle that implements our chosen life cycle
strategy.

These extra layers sound awfully like the kind of behaviours offered by
lightweight containers such as Pico container or Spring's container kernel.
So a solution might be OSGi plus a lightweight container.

This is kind of ironic as I headed into this stage of the discussion hoping
to shed some light on the choice between OSGi OR Pico OR Spring OR
'container of the month'.

-- Steve


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to