Gang, I made a quick code review in the SQL related Qi4j codebase, here are my thoughts.
libraries/sql ============= The new DataSource handling code pushed by Rickard has many advantages over the old one: - support the CircuitBreaker pattern - expose configuration and restart operations through JMX On the other side this new code is actually coupled to C3PO. The old code provide DBCP and PostgreSQL pool implementations, it would be nice to have that too with the new code. What would need to be backported from the old code too is the ability to import DataSources (I need this for an application where DataSources are provided by a JEE container). The Databases class that contains utility methods seemed ackwards to me. On one hand, methods that allows to work with ResultSets using the Qi4j I/O api are nice, on the other hand we could get rid of the methods using strings for statements. The java-sql-generator [1] library we use in entitystore-sql and indexing-sql allows to write SQL without using strings at all. entitystore-sql =============== Since we refactored the code to use java-sql-generator, Apache Derby is not supported anymore. Because of this I @Ignored the unit test against Derby today (it was alredy deactivated but with code). All in all we don't have anymore unit tests that are run in the default build against a database, in other words, all entitystore-sql unit tests are @Ignored. I don't feel comfortable with this. Plus, ATM entitystore-sql do not leverage the Qi4j Cache API. That would be a great addition. indexing-sql ============ I do not use this extension myself so I can't say a lot appart from the fact that in the default build there are no unit tests running for real against a database. Only one implementation of indexing-sql is available for PostgreSQL. Once java- sql-generator will support Apache Derby we could work on the Derby impl and have unit tests in the default build (ie. without having to set up an external database). +++++++++++++++++++++++++++ I think I can handle the refactor about DataSource myself but I can't give a timeframe as I'm working day & night actually. Will try to find the time asap. @Niclas & @Rickard: Do we try to put that in 1.3 final? What would be a reasonable deadline for this to be in the final 1.3? I don't think that the Apache Derby support is something I could handle quickly myself. @Stanislav: as you know I tried to add Derby support in java-sql-generator without success. Could you take a look ? /Paul [1] https://github.com/stazz/java-sql-generator -- Paul Merlin - eskatos.github.com _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

