While I've never looked at the code, my assumption would be that you don't
share open connections. The model for this sort of thing is usually open/do
work/close, rather than just opening a connection at startup and closing
when you close the app. Connection pooling means that instead of an "open"
to the database, you get to use a connection that the pool maintains, so the
opens that your application does are very fast (since they're really just
handing you a connection that's already open and in a known state).
Think of "open()" from the application turning into
"getExistingOpenConnectionFromPoolAndAllocateItToMeExclusivelyOhAndIfThereIs
ntAnExistingConnectionPleaseBuildOne()". Close() is
"ImAllDoneWithThisLetSomeoneElseUseItButYouDontNeedToTellTheDatabaseItsClose
d()."
- James