aspose file tools*
The moose likes JDBC and the fly likes General JDBC Questions for new Open Source project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "General JDBC Questions for new Open Source project" Watch "General JDBC Questions for new Open Source project" New topic
Author

General JDBC Questions for new Open Source project

Joe Pluta
Ranch Hand

Joined: Jun 23, 2003
Posts: 1376
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
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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.


GenRocket - Experts at Building Test Data
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: General JDBC Questions for new Open Source project