On Monday 22 July 2002 02:02 pm, Berin Loritsch wrote:
> > I have some components that can be used for a SAX pipeline,
> > and thus the
> > components aren't threadsafe. I decided for a factory vs
> > pooling because the
> > program only needs one component every 24hrs, since it is
> > part of an EDI
> > interface. A pool seemed like a waste of resources.
>
> In Fortress, it can be changed to PerThreadComponentHandler very
> easily.  The PerThreadComponentHandler uses lazy initialization,
> but ensures there is no more than one instance of the component
> per thread of execution.  If your thread that used the component
> dies, the component will be removed from use.  If there are no
> more requests, there are no more instances.

I have no guarantees on which thread will be running the code though. Its 
scheduled to run via phoenix's TimeScheduler which pulls from a ThreadPool, 
so the EDI could be running via a separate thread each time.. thus the # of 
components could grow the be equal the # of threads in the pool.. yada yada 
:)

-pete

-- 
peter royal -> [EMAIL PROTECTED]

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

Reply via email to