cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Startable components
Date Mon, 17 Oct 2005 16:30:11 GMT
Hi all,

I changed the lazy loading so that preload="true" is no more needed for 
components that *must* be loaded at startup time.

First of all, loading classes on a full Cocoon doesn't add that much 
time (100 ms on my 18 months old PowerBook), whereas initializing all 
components doubles the manager load time. So lazy loading _is_ useful.

All components that implement the Avalon Startable interface are now 
initialized at startup. A number of components implement this interface, 
and I'm not sure all of them really need it.

Components that for sure need to be loaded a startup time:
- cron: QuartzJobScheduler (must start registered jobs)
- hsqldb: ServerImpl (must start the db server)
- ojb: ConnectionFactoryImpl and LoggerImpl (because of the static 
attributes hack)
- portal: AbstractComponent (so that they're registered as event listeners)

Components that implement Startable but don't need to be loaded at 
startup time
- core: StoreJanitorImpl
  The janitor is not needed until some store registers itself on it.
- core: DefaultRunnableManager
  The thread pool can be created lazily when the first Runnable is executed.
- axis: SoapServer.
  There's no "server" per se, and the soap resquest and response are 
setup by the SoapReader.

I will remove the Startable interface on these components and move the 
corresponding code to initialize() and dispose()

Components that are either Startable or have the preload attribute, but 
which I'm not sure really need to be loaded at startup:
- portal: PortalToolManager
  Why does it need to be preloaded?
- jms: JMSConnectionManagerImpl
  Start() creates the connections and topics, but it looks like the 
component itself doesn't use these connections. So can their creation be 
deffered?

I would like to have some inputs on the last two components.

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Mime
View raw message