On Wednesday 06 October 2004 19:30, Simeon Koptelov wrote: > I have some questions regarding it: > 1. Is it the right way to ask container for components?
Depends what you mean by "container" in this context. The sample code you provided is far from complete. Merlin doesn't merely 'exist' in your servlet container, you have to instantiate it in its embedded form. Whether or not you then can 'assign' the root containment model into the servlet context object is also outside my knowledge domain, but if so, that is another thing you need to do if your code is going to have a chance of working. I would instead suggest that you have a class (probably a pre-loaded servlet) that instantiates the embedded Merlin instance, and only exist to provide the containment model for other servlets that needs it. > 2. does the container care about component > lifecycle when I do it, so I don't need to dispose components with > lifestyle="thread" at the end of action? Yes and No. Merlin will make a 'best effort' of disposing components that are no longer referenced. However, I wouldn't call this 100% yet, and a explicit release() is still recommended. > 3. Is the Merlin kernel threadsafe, so I can have one instance of > ServiceResolver per web application? That is the intention. However, due to the way most people are using Merlin, it has not been very exposed to multi-threaded calls, for instance two threads asking to decommission() (take out of the system) a component at the same time. It is definately an area that needs to be tightened up. Cheers Niclas -- +------//-------------------+ / http://www.bali.ac / / http://niclas.hedhman.org / +------//-------------------+ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]