DataSource...

This is not how DataSources are normally used! Normally the DataSource object will be synthesized dynamically by a Java Application Server (J2EE Server). However, I wrote this to demystify what a DataSource does. Note that most AppServer DataSources do much more: they also provide connection pooling, for example! But here is a minimal implementation.