I need some advice. I'm designing an n-tier application in .net. I wasn't
sure whether I wanted the data access code to be inside the business objects
or to encapsulate them in separate data access objects. Then I discovered
that ado.net's connection pooling only works on a per process basis. So I've
decided that all data access code would be placed in separate objects residing
on a central server. This will allow us to take advantage of ado.net's connection
pooling. But this potentially creates a new problem. What good does connection
pooling do if the data access objects are being creating and destroyed? Now
I'm thinking that I should implement some sort of object pooling. I'm guessing
that's what com+ does. But another possible solution is to make my data access
objects completely stateless and use shared (static) methods. This should
avoid the issue of the object pooling completely since no object would be
created or destroyed. Any comments or suggestions?