On Thursday, September 26, 2002, at 09:29 AM, Carsten Ziegeler wrote: > Example: I have two components, one being ThreadSafe and one Poolable > component which is of course not ThreadSafe. > > Now, the ThreadSafe component looks up the Poolable one, lets say > in the compose() method and stores this instance for the whole > lifetime. > > Does this work properly? I would assume that now the Poolable > component is used as a ThreadSafe one. Is this right? > Or do I oversee something?
Yes, you are correct. The single Poolable component you got will be used for all calls to the ThreadSafe component. For Poolable components, each call to ComponentManager.lookup() will return you a component instance from the pool. For the above example, since each call to a ThreadSafe component's methods are generally stateless, you would probably want to lookup() and release() a new Poolable in each method call. -pete -- peter royal -> [EMAIL PROTECTED] -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
