We discussed this in the expert group a while back and the result was that
every vendor was expected to have to specify the database platform in a vendor-specific way.
We created the persistent unit properties as the mechanism to solve this class of problem.
-Mike
-----Original Message-----
From: Lance.Andersen_at_Sun.COM [mailto:Lance.Andersen_at_Sun.COM]On Behalf Of Lance J. Andersen
Sent: Thursday, December 15, 2005 4:40 PM
To: persistence_at_glassfish.dev.java.net
Cc: Mitesh Meswani; Pramod Gopinath; Keith Michael L
Subject: Re: [Fwd: Proposed code changes to automatically detect databaseplatform]
This will be easier with JDBC 4 as we introduced the Wrapper interface which other interfaces extend such as DatabaseMetaData and DataSource and Connection
Peter Krogh wrote:
It also brings up the question, if app servers that wrap the underlying connection could return the wrong answer.
Mike, how was the spec envisioning that vendors would 'know' which database they were being connected to?
Peter Krogh
-----Original Message-----
From: Lance.Andersen_at_Sun.COM [mailto:Lance.Andersen_at_Sun.COM]On Behalf Of
Lance J. Andersen
Sent: Thursday, December 15, 2005 2:41 PM
To: Mitesh Meswani
Cc: persistence_at_glassfish.dev.java.net; Pramod Gopinath
Subject: Re: [Fwd: Proposed code changes to automatically detect
databaseplatform]
Mitesh Meswani wrote:
Hi Gordon,
The current property file contains mapping for all the databases
platforms that we currently have access to. It would be great to have
mapping for all the platform in the property file. Mapping for
following platforms are missing in the property file
AccessPlatform
AttunityPlatform
CloudscapePlatform
DB2MainframePlatform
DBasePlatform
HSQLPlatform
InformixPlatform
SQLAnyWherePlatform
TimesTenPlatform
Is it possible for you to provide what does
DatabaseMetaData#getDatabaseProductName() return for above platforms
for various supported driver combination. I will update the property
file with appropriate regular expression corresponding to that.
getDatabaseProductName() will/can differ based on the JDBC Driver being
used. For example jConnect kept all of this in set of tables that you
had to initialize so the value changed as the product name changed. the
DD drivers also used to specify a different name (as an example) for sybase
Thanks,
Mitesh
Gordon Yorke wrote:
When connecting to SQLAnywhere or SybaseIQ the SQLAnyWherePlatform
should be used. The known vendors in the properties file should be
expanded to cover all supported databases with the correct platform.
--Gordon