java - Which servlets are good member of pre initialization? -


by setting <load-on-startup>-1</load-on-startup> property in web.xml make servlet load whenever server starts up.

i know pre initialized servlets faster first request.

my question kind of servlets member setting. kind of functionality useful?

the load-on-startup controls when servlet's init() method called.

so, logically, if you've servlet init() method expensive , time consuming stuff, such parsing xml configuration files and/or populating application scoped data database, may idea on startup instead of on first request.

if don't have init() method, don't need care load-on-startup.

see also:


Comments

Popular posts from this blog

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -