I personally use a multithreaded pool for my database connections. Jack
On Wed, 27 Oct 2004 08:40:10 +0200, dmu2201 <[EMAIL PROTECTED]> wrote: > Rajesh wrote: > > > Hai McGrady > > > >I cant get you . > > > >I am writing a public final class inside that a normal public function which > >created a db connection and workis with it > > > >Inside finally of that function am calling static functiosn like > > > >Commons.closeResultSet(resultSet); > >Commons.closeStatement(oStatement); > >Commons.closeConnection(oConnection ); > > > >Inside each closeXXXX function i write > > > >If (obj != null) { > > obj.close(); > > obj = null; > >} > > > > > >Will this makes slowdown ? > > > >Regards, > > > >Rajmahendra R. Hegde > >GK Bharani Software Pvt. Ltd. > > > >There are two ways of constructing a software design. One way is to make it > >so simple that there are obviously no deficiencies. And the other way is to > >make it so complicated that there are no obvious deficiencies. > > -- C.A.R. Hoare > > > >-----Original Message----- > >From: Michael G. McGrady [mailto:[EMAIL PROTECTED] > >Sent: Wednesday, October 27, 2004 11:33 AM > >To: Struts Users Mailing List > >Subject: Re: General Question in JSP > > > >If you call a function inside another function and there is not decoupling > >and multithreading involved, then, of course, all things being equal, the > >first function cannot continue until the second completes. Is that an > >answer to your question? > > > >crack > > > > > >On Wed, 27 Oct 2004 11:13:08 +0530, Rajesh <[EMAIL PROTECTED]> wrote: > > > > > >>Hai all > >> > >>in Web prgramming (Struts,JSP,Servlet) > >> > >>if i call a static function say in a package Commons class having a > >>static functioin closeConnection(Connection con); > >> > >>which will globally closses any connection object which is passed inside > >> > >> > >it. > > > > > >>if i call this package class to all db calls in my package will this > >>slowdown my code executions ????? > >> > >> > > Every method call takes some time, which you can't avoid, so of course > you could say that every method call would slow down your code, > especially if you use recursive methods, but the overhead of calling a > method is not that big! If think the biggest slowdown is the database > connection, but that is a "prize" worth paying... > > Not sure if that is what you are looking for... > > Claus > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]