Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dtp-dev] cached server name and version

Hey Hui,

> clients. Shall we define a unified version retrieving mechanism? e.
> g. always try to get version from solution 1, and only if it failed,
> shall we resort to solution 2. The benefit of this mechanism is
> clients don't have to define almost identical driver templates for
> different versions of a database. This mechanism is used in SQL Dev
> Tools now, ProfileUtil.getDatabaseVendorDefinitionId() defines the
> retrieving logic, while DatabaseVendorDefinitionId defines the
> version comparison logic (e.g. 15.1 is compatible with 15.x). But I found
the
> ConnectionInfoImpl class just uses solution 2 (always get it from
> driver template).
>

I think this is a good idea.  It has always bothered me that there were two
different ways of determining the version to use, especially since one
version is definitive (obtained from the server itself) and the other is
statically defined by the user.

I would add that if the vendor/version is not defined, the
ConnectionInfoImpl should fallback to use the generic JDBC dbdefinition and
log this to both syserr (so the developer notices this in his debug env)
and the Eclipse log.

The only difficulties I see would be:
1. Making sure the vendor string returned by the server matches up with the
vendor string used by the dbdefinition.
2. Resolving to the appropriate dbdefinition version.  This version number
typically only includes major and minor version while the server often
returns a full version identifier with major, minor, release and
patch/build.  We also need to define a resolution mechanism if a match
cannot be found (e.g. actual version 12.5.1, dbdefinition version 12.0,
12.5, 15.0).

I've created a BZ entry for this,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=166526

Thanks again for the suggestion.
Rob



Back to the top