avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <blorit...@apache.org>
Subject RE: Fortres: async/sync init
Date Wed, 17 Jul 2002 18:54:23 GMT
> From: Jason van Zyl [mailto:jason@zenplex.com] 
> 
> > 
> > <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:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message