I need some clarity on how the transient lifestyle is handled in merlin.

Let's say I have some WorkerComponent that implements some service X. It also implements Runnable. This component has a transient lifestyle defined.

Let's say I also have some ManagerComponent that in response to some event performs a service manager lookup to get a new instance of a WorkerComponent.

My assumption is that in response to the lookup, merlin will invoke WorkerComponent's lifecyle methods (service-configure-initialize-start, etc.)

After getting an instance of WorkerComponent, the ManagerComponent then creates a new thread with this component (since it also implements Runnable), and starts the thread.

Of course, the ManagerComponent goes off and does other things, "forgetting" about the WorkerComponent instances running in thread. When the thread ends, how does merlin know to invoke the stop or dispose lifecycle method?

Is this even a *correct* way to use a transient component?

Regards,
Timothy



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



Reply via email to