Aseem Bansal wrote:

Hi,

I am trying to deploy the various components of my application into
Merlin and have the following queries .

a) Is it possible to build an event listener mechanism in Merlin in
which all the listeners receives a notification when ever a new
instance of any component is created.

This is possible. We would need to include the event generation in the DefaultComponentFactory and add the appropriate event and listener definitions in the composition api. I also think we need this for the sort of things your doing.


Note that I am not talking about new componentModel (which i guess is
'1' per component) or CompositionEvent (fired for every
additon/deletion of componentModel), but rather about new instances
of a component.

Yes - I understand.


It's a function of the lifecycle handler assigned to a particular instance of a model, from which 1..n component instances may be created depending on the lifestyle.

b) Is there any concept of named component instances in Merlin?

As per my till date experience with merlin, i feel that the life
styles (transient, singleton, threaded or pooled ) assume that 2
instances of a particular component are almost (or probably 100%)
same as they expose the same services. But in case i want to build a
mechanism by which any one can lookup (similar to JNDI lookups) a
particular instance of a component, then how should i build it?

For example : -

One of my component, 'ComponentA' has two instances MyComp1 and
MyComp2. How can i build a mechanism by which it is possible to
lookup "MyComp1"  like the JNDI lookups.

Are we talking transient identity or persistent identity?


I think we can address transient identity reasonably quickly - persistent identity is another matter.

c) Does managing a transient component using available JMX facility
make sense as the facility will always create new components while
its model.resolve() call.

Currently it only makes sense for singleton components - but the bigger picture is to address instance identification and resolution - combined with a JMX manageable lifestyle handler.


Stephen.

-Aseem




Fiorano MailServer All incoming and outgoing mails are scanned for Virus and Spam http://www.fiorano.com




--

|---------------------------------------|
| Magic by Merlin                       |
| Production by Avalon                  |
|                                       |
| http://avalon.apache.org              |
|---------------------------------------|

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



Reply via email to