dev@glassfish.java.net

Re: Compiling Glassfish in Eclipse

From: Markus KARG <markus.karg_at_gmx.net>
Date: Mon, 02 Oct 2006 20:00:50 +0200

Tom,

thank you for this explanation. Now I know what TopLink Essentials is.
Please find more questions inlined.
> First of all, from a different email: The Java Persistence API
> implementation found in GlassFish was contributed by Oracle and is an
> open-source version of Oracle's TopLink product. That version is
> called TopLink Essentials. We are working with Sun to make that more
> obvious in the GlassFish product. TopLink Essentials is actually the
> JPA implementation for a number of Application servers including
> Oracle AS, GlassFish, Sun AS, Spring 2.0, JEUS (Tmax Soft), and Easy
> Beans (JOnAS EJB 3.0 Container)
So when I contribute MaxDB support to GlassFish, then it is also
available in JOnAS? Great! :-)
> Since this is our first foray into the open source world, there are
> definitely some ease-of-development challenges we have to face to make
> it easier for new developers to contribute. We appreciate the
> patience you have given us so far.
I appreciate all your kind help, too, and I really like Oracle's and
Sun's Open Source efforts. But see, I am doing this MaxDB contributions
in my spare time, so I need to be economic (I have a 50 hours week in my
main job and my family doesn't have a benefit from my GF contributions
actually) -- I can't spent weeks in simple things like getting something
compiled (I wonder how Oracle and Sun can do that since those have to
their employees pay for it, while my time is free actually). These are
steps that the GF team should have fixed ASAP, since most Open Source
contributors do not have plenty of free time, also fixing build problems
are making Sun's and Oracle's software not cheaper for the later
customer... ;-)
> It is true that there are quite a number of things to consider when
> extending the database support in TopLink. In general, the best
> approach to take is to pick a database with similar features and SQL
> support and use the functionality in it's DatabasePlatform subclass as
> a base for the functionality you are implementing. That is why I was
> hoping MaxDB would have similar functionality to MySQL.
Clarified meanwhile. :-)
> 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.
Here is the complete build.properties file. Still testresults.txt is
showing up that DatabasePlatform is used but not MaxDBPlatform. So it
seems there is another place to change it?

jdbc.driver.jar=/opt/sdb/programs/runtime/jar/sapdbc.jar
db.driver=com.sap.dbtech.jdbc.DriverSapDB
db.url=jdbc:sapdb://localhost/SCRUM
db.user=DBA
db.pwd=SQL
db.type=true
tl.platform=oracle.toplink.essentials.platform.database.MaxDBPlatform
toplink.target-database=oracle.toplink.essentials.platform.database.MaxDBPlatform
result.file=testresults
junit.location=../appserv-tests/lib/junit.jar
src.dir=src/java
component.classes.dir=build/main_jar
validation.classes.dir=build/validation_jar
ddl_generation.classes.dir=build/ddl_generation_jar

>
>> (2) Why does it still tell me that I would not support native sequences
>> while I have added "return true"?
> Native Sequencing integration is likely one of the biggest challenges
> you will face in your MaxDB implementation. The code that throws the
> exception you are seeing checks supportsNativeSequenceNumbers() and
> getSelectQuery() on the database platform, so perhaps the select query
> is null.
Okay, so I will implement getSelectQuery() (or some method it is
calling). I'll check that. Thanks a lot, meanwhile. :-)
> Take a look at OraclePlatform. It also requires to know the name of
> the sequence.
Great tip! I will check how it was implemented in OraclePlatform. It's
great to have a tutor like you at hand. :-)
> Feel free to ask questions. Unfortunately, just indicating whether
> something is supported is sometimes not adequate given that some
> databases build the SQL statements they use to expose certain features
> in completely different ways. Some areas where that is particularly
> true are Native Sequencing, Outer Joins and Select for update. Having
> said that, you are correct when you indicate that the developer
> experience could be quite a bit better for users that wish to extend
> DatabasePlatforms. I can tell you simply that we are working every
> day to make this product a better open source solution. Your feedback
> will definitely help.
I will try your tips immediately, but please send me information how to
make the test use MaxDBPlatform but not DatabasePlatform. I cannot check
whether my code works well otherwise.

Thanks a lot! :-)
Markus