Berin, Leo, Marcus:

I've put in place an initial implementation of the lifestyle handling 
mechanisms into Merlin in order to get some initial feedback. The 
implementation is on one hand constrained by the meta-data driven 
approach in Merlin 2.0, and on the other-hand, reflects the Fortress 
approach.

Here is a brief summary of the structure:

LifestyleManager:

A lifestyle manager is an interface implemented by classes the provide 
lifecycle handlers. Currently the kernel instantiated a new lifestyle 
manager based on a lifestyles declaration in the kernel file. In the 
furture I plan to include this (optionally) in containers as well. The 
XML declaration is as
follows:

<kernel>
<lifestyles class="MyLifestyleClass"/>
<!-- other regular kernel stuff -->
</kernel>

The kernel creates a new instance of the declared class and associates 
it with the root container manager (which means that its available to 
the container type management hierachy). The
implemetation class must implement the 
org.apache.excalibur.merlin.resource.LifestyleManager interface.
That interface defines the following method:

public LifestyleHandler getHandler(
ContainerManager manager,
LifecycleHelper helper,
ResourceProvider provider,
Profile profile,
Context context ) throws Exception;

Class ref:

excalibur/merlin/resource/LifestyleManager

which returns a lifestyle handler:

excalibur/merlin/resource/LifestyleHandler


I have alse put in place both transient and singleton implementation
classes together with a DefaultLifestyleManager class.

excalibur/merlin/resource/SingletonLifestyleHandler
excalibur/merlin/resource/TransientLifestyleHandler
excalibur/merlin/resource/DefaultLifestyleManager

Before going further, I would like to validate this with Fortress
people to make sure that the approach I'm using is consistent. Given
the above interfaces and default implemetations, the approach (and
degree of flexibility) should be reasonably clear.

All feedback appreciated.

Cheers, Steve.

-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:[EMAIL PROTECTED]
http://www.osm.net



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

Reply via email to