Howdy folks! I'm just starting up a new project which I hope to release into the Open Source community. It's a JDBC bridge for OS/400, something not a whole lot of people outside of my community have an interest in, but one which is crucial to my niche. Anyway, the idea requires some understanding of how JDBC drivers are configured. I haven't used JDBC extensively for a couple of years now, and I need a little reassurance that things haven't changed drastically while I was away. As I remember, with a traditional JDBC application, most configuration parameters were passed when you created your connection. Usually you passed a URL, a user name and a password. Variations of this technique worked, including having runtime parameters on the URL (such as cache size and so on), and in later releases of JDBC, passing a Properties object rather than individual parameters. Then we have pooled connections, with which I am much less familiar. From what I understand, pooled connections represent connections to a DataSource, where all the configuration information is stored in a properties file. Now I may be confusing this with the JDBC2 XA DataSource concept; if so, I'd appreciate enlightenment. Are there other ways to configure DataSources programmatically that I just don't know about? Anyway, my big question after running through this little peek into the meager knowledge in my mind is: how many people use connection pooling as opposed to straight JDBC connections, and how do you configure your connections? I want to get some idea of how much variety there is out there. Joe
I only use Connection Pooling for Web Apps. All desktop apps, I just create 1 connection and use it throughout the applications lifetime. With Web Apps, I just use the JNDI for configuring my datasource. So I give it a Driver, a URL, a username, and a password. And then there is the typical how many connections to allow. A timeout can be specified. Things like that. With desktop applications, I just pass it a URL, Username, and Password.