T
TaeHo Yoo
Hi guys,
I am not too sure if I understand the connection pooling or not. But I
am implementing an application where in one page I open connections a
few times each time I close connection properly. My question is thanks
to the connection pooling the first opened connection will stay in the
memory and reused for the rest? Am I correct?
If not, my ASP.NET application has 3 tiers. Client application layer
(HTML and code behind), business layer and database layer.
Now on business layer, in most of functions we open a connection and
close.
Something like for instance
Publisher class
public static dataset getPublisherDetails(int publisherid)
{
connection.open();
connection.close();
return resultdataset;
}
public static dataset getItemsByPublisherID(int publisherid)
{
connection.open();
connection.close();
return resultdataset;
}
and in Customer layer
we say
dataset publisherDetails = Publisher.getPublisherDetails(publisherid)
dataset publisherItems = Publisher.getItemsByPublisherID(publisherid)
as you can see we open connection twice here. But this is a very brief
way of describing all layers I actually use. but just assume that
according to our current application architecture it is really hard to
open connection once to process one page. Is it really bad way of
constructing application architecture so that we will have to
reconstructing it or ??
Look forward to hearing from you guru!!!
Thanks
I am not too sure if I understand the connection pooling or not. But I
am implementing an application where in one page I open connections a
few times each time I close connection properly. My question is thanks
to the connection pooling the first opened connection will stay in the
memory and reused for the rest? Am I correct?
If not, my ASP.NET application has 3 tiers. Client application layer
(HTML and code behind), business layer and database layer.
Now on business layer, in most of functions we open a connection and
close.
Something like for instance
Publisher class
public static dataset getPublisherDetails(int publisherid)
{
connection.open();
connection.close();
return resultdataset;
}
public static dataset getItemsByPublisherID(int publisherid)
{
connection.open();
connection.close();
return resultdataset;
}
and in Customer layer
we say
dataset publisherDetails = Publisher.getPublisherDetails(publisherid)
dataset publisherItems = Publisher.getItemsByPublisherID(publisherid)
as you can see we open connection twice here. But this is a very brief
way of describing all layers I actually use. but just assume that
according to our current application architecture it is really hard to
open connection once to process one page. Is it really bad way of
constructing application architecture so that we will have to
reconstructing it or ??
Look forward to hearing from you guru!!!
Thanks