----- Original Message ----- From: "Peter Huber" <[EMAIL PROTECTED]>
> > Peter Huber wrote > > > I think init should be called on startup of the servlet container. > > > So if you have very long lasting init procedures better use init. > > > > I fail to see the point here. How does the time taken to execute the > > initialization matter here. > > > Init is called on startup of servlet-container (afaik). Therefore > initializations are done before the very first call to a servlet in > your webapp. If your webapp depend on resources like a db-connection > pool then I think it's neat to have such resources at hand after > startup or cancel startup (if possible) if resources are not available. I thought you were saying that it is better to put the connection pool initialization in the init() method as compared to the context initialization event. There are some resources which generally belong to the application rather than a servlet, like a connection pool so these are better initialized utilizing the context events. So for a DB connection pool initialization the best means would be as follows in decreasing order of preferance 1. Context Initialization 2. init() method 3. initialization on the receiving the first request. Regds, Gokul
----------------------------------------------------------------------------------------------------------------------- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. ------------------------------------------------------------------------------------------------------------------------
