Hi ,
while going through interview questions i came across this question .
Can a database connection pool be instantiated in init
method of
servlet instead of server connection pool?
What will be the problem?
It is true that connection pool can be instantiated in init
method of Servlet and is available for the web application
to use, but generally there can be many web application
required to use database connection pool, and multiple
web applications do not have access beyond ServletContext.
So it is desirable to have external resources defined at
server level, not at an application level.
Please let me know what does rhe author mean by this ??