Olaf Bergner wrote:

Thanks a bunch.


-----Original Message-----
From: Stephen McConnell [mailto:[EMAIL PROTECTED]
Sent: Monday, January 19, 2004 8:01 PM
To: Avalon framework users
Subject: Re: [Merlin] Listener best practices

...

Take a look in merlin cvs.

Under the merlin/facilities/http directory you will find an example of a
model listener. The http listener itself doesn't do much yet - but you
will get an idea of the general approach.  The listener is a component
but its only deployable under the system container hierarchy.


Let's see if I got your advise straight:

(1) Current merlin development aims at granting special "system"
components - termed facilities - access to merlin's internal deployment meta
model via registering them as listeners for containment/deployment/whatever
related events?

Yes.


(2) I would guess that these facilities have to be configured in kernel.xml?

Correct. <kernel> <facilities> <!-- this is a system container --> </facilities> </kernel>

(3) I could write such a facility myself, registering it as a listener for
CompositionEvents (or ContainmentEvents, or DeploymentEvents? You see me a
little confused)?

Today you can write a component that declares the context entry dependency using the key "urn:composition:application" - the value of which is a ContainmentModel. You component can then either/or browse the model, modify the model, register a model listener.


The only available event (today) is a model; composition event (adding or removing a child to the application model hierachy.

(4) Upon reception of such a WhateverEvent my homegrown facility could
somehow (how?) determine if this event is related to a component which
should implement listeners, access said component, dynamically create those
required listeners and register them with the component?

Once runtime events are in place - yes. But its not there yet.


Seems like a very powerful mechanism. But what is this
"urn:composition:application" context key?

The root meta-model for the application container (where the "other" components hang out).


A special system context key
under which the entire container hierarchy is accessible?

Yep. An instance of ContainmentModel.


Stephen.


Cheers,

Olaf



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




--

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/merlin/distributions/latest    |
|------------------------------------------------|

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



Reply via email to