> From: Jason van Zyl [mailto:[EMAIL PROTECTED]] 
> 
> > 
> > <fortress init-policy="lazy"/>
> > <fortress init-policy="async"/>
> 
> What, technically, is the difference between async and lazy 
> initialization?


Lazy initialization means that components are initialized as
they are asked for.

Asynchronous initialization means that all the components are
initialized on container startup, but it is done in one or more
background threads so that we have a faster percieved startup
time.


> Can there also be the case where you want a component to be 
> initialized upon container startup? My use case is an xmlrpc 
> component that needs to respond once the container is 
> started. I have hacked something to request the component so 
> it is initialized in order that the xmlrpc server be 
> responsive upon container start. I assume this is a pretty 
> common thing so maybe I'm just missing the standard pattern 
> for doing this.

What Fortress was designed to do is start the background
initialization immediately.  If a client requests a component
that is not yet initialized, Fortress will ensure that it is
done before it gives the component back to the client.

That is why lazy initialization works when async is broken.


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

Reply via email to