> I created a branch, JDBC2POOL_BRANCH, to do this work. I was planning > to merge this post 3.0 release. But the release process is moving very > slowly. Maybe it would be better to eliminate DBConnection prior to the > release?
I don't get a vote but would +1 getting rid of DBConnection. > > - is there a good way to find out, at runtime, what database you're > > connecting to? When all you have is a DataSource and a JNDI resource name, > > you have no way of knowing the underlying database, which Torque needs to > > know to pick the right database adapter. Is there some magic JDBC query or > > escape that lets you figure out your database? (conn.getClass() doesn't > > work because it is usually wrapped by the pool, e.g., > > org.apache.commons.dbcp.PoolableConnection) > > > > I just introduced a property to specify the database type or adapter. > This used to be specified separately from the driver property and tying > them together has caused about as many questions as having the two > properties. As you point out there is no way (or we have been unable to > find a way) to keep the mapping using datasources. I may have found a way-- conn.getMetaData().getDatabaseProductName() returns String - returns "Oracle" in Oracle - returns "MySQL" in mysql - returns "PostgreSQL" in postgresql the DatabaseMetaData object returned by conn.getMetaData() seems to return a bunch of other useful info too. -- Bill -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
