Community
Participate
Working Groups
Support H2 as a database backend (http://www.h2database.com/html/main.html).
I started working on the H2 database support. I started using the H2 driver from Spring OSGI repository (com.springsource.org.h2)but having the same "Unsatisfied version constraint" problems as we had with the org.eclipse.net4j.db.mysql bundle (does in the meantime someone know why that happens?). So I directly use the driver from the H2 site (they also provide an OSGI bundle). The H2 db adapter is mostly a mix of derby and hsqldb adapter. I also wrote a test for my for the H2 db adapter, but it finished with about 40 errors. I also ran the HSQLDB test, but those also about 40 errors and failures. Is the HSQLDB support for CDO anyhow considered as stable? Is there any db adapter test that finishes without any errors?
Created attachment 137138 [details] Initial H2 adapter implementation
Created attachment 137139 [details] Initial H2 adapter test
I don't have the time to look into your code now because it's RC2 day. If you're referring to CDO tests (as opposed to possible Net4j DB tests) then we should ask Stefan.
I'm willing to prepare the legal process for H2 usage. Where can I find related information, e.g. project web page, license URL? And I will need a zip of the sources for submission to IPZilla. Please do not attach it here as it could violate the terms of use. Please send it to me directly via email. This is what IPZilla will ask me: "This CQ is awaiting source code. Please attach it to this CQ at your earliest convenience. Please note: your attachment must not contain nested ZIP, JAR, TAR or any other type of compressed files. Please remove nested ZIP files if they are not required prior to submitting the attachment, or unzip the contents and delete the nested ZIP file. Content originating from another package (ZIPs, JARs or other) should be removed and requested via a separate CQ. "
Our CQ for H2 support was approved: http://dev.eclipse.org/ipzilla/show_bug.cgi?id=3377
Ok, I had a look at the plugin and testcase. I replaced a few occurrences of Cut&Paste errors (Mainly HSQLDB -> H2 renamings). The code as it is seems ok to me. Copyright notice etc. are there and the code is mainly copied from existing DBAdapters. I also ran the tests. Errors/Fails = 29/6 which is typical for DBStore implementations (due to missing or only partially implemented features). Eike, please review. I don't know, if you need a formal statement from Kai before putting it into CVS, this is why, I did not do so. The ZIP-Attachment can be imported as an existing project from archive. The testcase is a patch against the test.db project. I stripped the -feature project from the ZIP for now, as there are no features for the other databases (and because I don't know much about the feature mechanism). I also don't really know, where to get the cited H2 OSGi-Bundle - I tested with a self-created support plugin which exports the org.h2 and org.h2.jdbcx packages.
Created attachment 138401 [details] DBAdapter-Project-to-import Ready for review
Created attachment 138402 [details] Patch to cdo.tests.db Ready for review (includes MANIFEST changes and run configuration for H2 testsuite)
> Eike, please review. I don't know, if you need a formal statement from Kai > before putting it into CVS, this is why, I did not do so. What formal statement? > I also don't really know, where to get the cited H2 OSGi-Bundle - I tested with > a self-created support plugin which exports the org.h2 and org.h2.jdbcx > packages. Just download the H2 "All platforms" from the mainsite (http://www.h2database.com/html/main.html). The OSGi bundle is inside the zip (/h2/bin/h2-1.1.114.jar).
Kai, can you please confirm here that: 1) The number of lines that you changed (after copying from HSQLDB) is smaller than 250. 2) You are the only author of these changed lines. 3) You apply the EPL to these changed lines. If your contribution is bigger than 250 lines, it is not considered small anymore and we need to go through a bigger legal process with paperwork for you.
(In reply to comment #11) > Kai, can you please confirm here that: > > 1) The number of lines that you changed (after copying from HSQLDB) is smaller > than 250. Confirmed. > > 2) You are the only author of these changed lines. Confirmed. > > 3) You apply the EPL to these changed lines. Confirmed. :-)
BTW. the newer zip does not contain the fature anymore! I made a new one ;-(
Added h2 adapter plugin and its feature to CVS. Added h2 engine bundle and its feature to http://net4j.sourceforge.net/update
Added tests patch. Adjusted PSFs. Committed to HEAD.
Updated IP log.
Fix available in NET4J 2.0.0RC4
Generally available.