Niclas Hedhman" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > 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)
that also was a thing i had to discover the hard way ;-)) since the docs give no further explanation what exactly "singleton" and "transient" mean, i followed the java way of thinking a singleton is a class with only ever one instance. but it seems that merlin defines these terms more with respect to the behaviour of proxy resolution than to poor existance. > 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. btw. is a component the instance of an implementation class that lives in the context of a container or is it the static structure of the implementation? > 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() ). that seems to be what i was looking for! now please consider that i have different implementations of socket handlers (components that implement the same service). of course i also have different implementations of server socket handlers. i call them connectors and acceptors. how could a certain acceptor implementation tell the ServiceManager to lookup the appropriate connector implementation? /eike --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
