Exactly--if you can determine your database vendor at runtime, you can point your app server's datasource definition at a different database without having to touch Torque.properties.
I was thinking of having the initialization routine somewhere determine the db adapter type for each datasource that doesn't have an explicit adapter property. How would it complicate unit tests? -- Bill ----- Original Message ----- From: "John McNally" <[EMAIL PROTECTED]> To: "Turbine Torque Developers List" <[EMAIL PROTECTED]> Sent: Friday, May 31, 2002 5:11 PM Subject: Re: datasources from JNDI > It could be used to remove the need for a torque.database.?.adapter > property, but this will just complicate unit testing. We could > always keep the property and use this as a fallback. > > john mcnally > > On Fri, 2002-05-31 at 10:53, Daniel Rall wrote: > > "Bill Schneider" <[EMAIL PROTECTED]> writes: > > > > >> 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. > > > > John, have any ideas on where to integrate this in? It seems useful, > > but I can't place it off hand. > > > > -- > > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
