commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karthik Kumar <karthikku...@gmail.com>
Subject New Subproject / Dbutils Proposal
Date Tue, 14 Feb 2006 18:51:43 GMT
Hi,

I've been working with the commons for quite some time now. I found it very
difficult to handle multiple database connectivity configuration with the
existing alternatives.  Hence, i decided to  work out something that
resembles the log4j way of configuring multiple loggers thru' a
configurator.

I've currently made a few sample factories, a working Property file
configurator. I am attaching herewith, the .properties file I use to
connect. I am also working on a XML configurator, in which i intend to use
(Xerces) DOM or commons-digester.

Current Usage:

        PropertyConfigurator mPC=new PropertyConfigurator();
        mPC.configure(ConnectionManager.getInstance());
        mCon=ConnectionManager.getInstance().getDefaultConnection();

or, wrt the given sample file:

        mCon1=ConnectionManager.getInstance().getConnection("MySQL");
        mCon2=ConnectionManager.getInstance().getConnection("Oracle");


By this, i'm trying to achieve easy runtime connectivity configuration,
without changing any parameters in the application... In the future, it
might be a way of instantiating JDBC Context resources in tomcat.

Please let me know the idea of getting this useful feature into the commons.

--
Karthik
http://guilt.bafsoft.net
Mime
View raw message