dev@glassfish.java.net

Re: Compiling Glassfish in Eclipse

From: Markus KARG <markus.karg_at_gmx.net>
Date: Tue, 03 Oct 2006 11:14:30 +0200

Tom and Mitesh,

thank you for your kind help. I have removed the lines from
build.properties and instead added the following line to
entity-persistence/src/java/oracle/toplink/essentials/internal/helper/VendorNameToPlatformMapping.properties:

SAP\u0020DB=oracle.toplink.essentials.platform.database.MaxDBPlatform

This actually made the test use MaxDBPlatform instead of DatabasePlatform.

I abstained from using a more complex regex because the MaxDB driver
returns the simple string "SAP DB" always, so there is no need to check
for more complex variations.

So now I can go on implementing MaxDB support. :-)

BTW, I have seen that there is support for the Sybase products "Adaptive
Server Anywhere" (aka "iAnywhere" aka "SQL Anywhere" aka "ASA") and
"Adaptive Server Enterprise" (aka "SQL Server" aka "ASE"). I am an
"iAnywhere" ("ASA") expert, administering, using, optimizing and
teaching use of that product since more than ten years, supporting that
product at ten thousand workplaces world wide, for more than one
thousand companies (so you can imagine that I know quite well what "ASA"
is, and what "ASE" is, and how they are related, or better, how they are
NOT). I have seen that the support for "iAnywhere" is done by extending
"SybasePlatform". Actually this is wrong (I think you did that because
both is sold and developed by the same company, Sybase, and both is
connected by the jConnect driver). This might work by incident, as it
also would work to write a MSSQL platform by extending SybasePlatform.
But historically and technically, it is completely wrong! As you did the
same failing assumption days ago with "MySQL" and "MaxDB" (you thought I
can implement MaxDB as an extention of MySQL), please let me explain so
you can learn and fix the failure:

Sybase developed a product called "SQL Server", a joint venture done
with Microsoft. The project was splitted up into two products. One today
is called "Adaptive Server Enterprise" (ASE) and gets sold and developed
by Sybase. The other today is called "Microsoft SQL Server" (MSSQL) and
gets sold and developed by Microsoft. Since today, they share a lot of
common code (e. g. they are using both the TDS/IP protocol and the same
SQL dialect), but in fact, development was splitted up decades ago and
you can expect both to be independent products today. No one would
implement MSSQL platform as an extention to SybaseSQL, actually.

Watcom (known from Watcom C++ compiler suite) in the early 90s developed
a product called "Watcom SQL Anywhere", a laptop-sized RDBMS. PowerSoft
(known from PowerBuilder 4GL tool) bought Watcom, so they owned Watcom's
"SQL Anywhere", which was bundled with their "PowerBuilder" tool since
its early days already. In then mid 90s Sybase remarked that they cannot
just sell databases, they had to bundle it with some kind of IDE, so
they bundled it with PowerBuilder. Sybase then bought the PowerBuilder
vendor, PowerSoft, and such obtained "Watcom SQL Anywhere" (from now on
called "Sybase SQL Anywhere". They packaged it in a nice Sybase box, and
it was called "Adaptive Server Anywhere" (ASA). So there is no technical
relation between Sybase ASA and Sybase ASE. Both are 100% independent
code till today. The only thing both products are sharing, is the TDS/IP
protocol (which they also share with MSSQL), so this is the reason why
the Sybase jConnect JDBC driver is able to talk to not only ASE and
MSSQL, but also to ASA. In fact, the original JDBC driver of ASA is NOT
jConnect but a native driver called "iAnywhere JDBC", which doesn't
share anything with jConnect: jConnect is 100% pure Java, while
"iAnywhere JDBC" is native code (and much faster than jConnect). Until
today, jConnect is not able to support every feature of ASA!

In short words:

* MSSQL and Sybase ASE are sharing parts of their codebase.
* Sybase ASA and Sybase ASE do not share anything.
* Real support of Sybase ASA needs to be implemented using "iAnywhere
JDBC" instead of "jConnect".

So it is false from a technical view that MSSQL and Sybase ASE are
independent platforms in TopLink, while Sybase ASA and Sybase ASE are
linked. Actually Sybase ASA must be "unlinked" from Sybase ASE. If you
have a look at the ASA manual you will see that both databases and
drivers have totally different usage and constraints, they do neither
share the SQL dialect nor any other constraints.

Maybe that is the point why ASA is not to be found in
entity-persistence/src/java/oracle/toplink/essentials/internal/helper/VendorNameToPlatformMapping.properties?

Thanks for all!
Markus

Tom Ware wrote:
> More info:
>
> <snip>
>
>>>>
>>>>
>>>>
>>> How is MaxDBPlatform specified in build.properties? Try switching
>>> to: toplink.target-database=<fully qualified class name>. I will
>>> fix the tl.platform property in the current build script. The
>>> reason it doesn't cause problems for other databases is the existing
>>> Databases are in general covered by our automatic detection
>>> feature. Hopefully when you have added support, we can add MaxDB
>>> to the list of Databases we automatically detect.
>>>
>> To add autodetection for MaxDB, you will need to add a regular
>> expression to
>> entity-persistence/src/java/oracle/toplink/essentials/internal/helper/VendorNameToPlatformMapping.properties
>> that maps
>> the return value of DatabaseMetaData#getDatabaseProductName() by
>> various drivers of MaxDB to
>> oracle.toplink.essentials.platform.database.MaxDBPlatform.