On Monday 07 June 2004 23:17, Eike Stepper wrote:

> 1. what exactly is commisioning, what happens during that phase and what is
>     the difference to incarnation?
>
> 2. how can i influence merlin when deciding which component to use for such
>     a service request?

I am also reading your response to Stephen, and I get the impression that you 
may only be looking for 'transient' lifestyle :o)

You mentioned Tcp connections, and a case where you have a ServerSocket 
handler, which accepts and hand over the Socket to another compontent.

This is NOT the use-case for managing components in the Model.
We thought you were looking for adding new components (as in Types) to the 
container after it was started.

If you declare the "LifeStyle" of the socket handler in the above case, as 
"Transient", Merlin will instantiate and initalize a new instance on EACH 
lookup. You are supposed to call servicemanager.release( object ), when you 
are done with it, so it can freed up properly (but Merlin has some built-in 
mechanisms (I can't find the docs :o(  ) to handle that for you if it gets 
too complicated for you.)

That's it!!

When there is a connection, the ServerSocket handler, uses the 
ServiceManager's lookup() method to locate the Socket handler, and passes the 
socket across, and possibly some reference ( to manage the release() ).

Links of interest;

http://avalon.apache.org/meta/tags/type.html
http://avalon.apache.org/merlin/reference/component/artifacts/manager.html


I think this will bring you back on track again....


Cheers
Niclas
-- 
   +------//-------------------+
  / http://www.bali.ac        /
 / http://niclas.hedhman.org / 
+------//-------------------+


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

Reply via email to