Both techniques have their advantaes and disadvantages. A singleton class usually has problems when reloading the context. Using a Servlet Base for JSPs makes you container version dependent (As the minimum implementation required can change among jasper versions).
Anyway, the performance improvements you can achieve selecting between these two options are probably minimal. Depending on your webapp DB load, you could obtain a greater performance boost using a connection pool. Look at the "JNDI DataSource HOW-TO" for more info about this :-) Hope this help, Rodrigo Ruiz kgsat wrote: >Dear experts, > >It may not be appropriate to ask this doubt here.Though i am aware of it , i >chose to ask here thinking that experts would forgive me. > >Now the doubt is....... > >In a web application, what is the performance difference of using singleton >class and a base servlet to do the database related operations such as >loading the driver, obtaining the dbURL and obtaining the connection >instance for further db operations. >I use a singleton class for my db requirements in jsps and servlets and also >in other beans. >One of my friends suggests that using base servlet to do the same work is >more efficient. >Can any one throw some more light on this topic.i want to improve the >performance of my web application. >Any white papers or pointing URLs are given astounding welcome. >thanks and regards >sat > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
