Hello lee,
For your reason pooling and cache is solutions.
Connections generally keeps in pool.
If u want some object to be in memmory - keep them in cache.
Sharing object accross application depends on this app. it's either on singleton/monostate
object, or horisonted scaled object
l> I've been programming with Delphi for the past 4 years or so and
l> while Delphi does allow globals, I use them very judiciously. I say
l> that I *do* use them because I think that in some cases they are a
l> good choice.
l>
l> Now in C# there are no global vars. MSDN and google say that I can
l> use static classes (err, or static methods in classes) like
l> Type.TypeOf, etc.
l>
l> What if I have an object that contains resources for the rest of my
l> application such as a pre-opened database connection or maybe static
l> data that makes sense to keep in memory because it's used so often.
l> Is overriding the constructor of every object in the application the
l> only (best? Advised?) way of sharing an object accross the
l> application?
l>
l> Thanks for any clarity..
l>
l> "Upon further investigation it appears that your software is missing
l> just one thing. It definitely needs more cow bell..."
l>
---
WBR,
Michael Nemtsev :: blog:
http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche