A nice way of using jOOQ with Spring

This blog post is outdated. For a more up-to-date example of how to integrate jOOQ with Spring, please consider the relevant sections of the jOOQ manual! A nice way of using jOOQ with Spring was recently discussed on Stack Overflow by Adam Gent: http://adamgent.com/post/31128631472/getting-jooq-to-work-with-spring-correctly The essence of it was given here in this gist: package … Continue reading A nice way of using jOOQ with Spring

Throw checked exceptions like runtime exceptions in Java

How to throw a checked exception without catch block or throws clause in Java? Simple! public class Test { // No throws clause here public static void main(String[] args) { doThrow(new SQLException()); } static void doThrow(Exception e) { Test.<RuntimeException> doThrow0(e); } @SuppressWarnings("unchecked") static <E extends Exception> void doThrow0(Exception e) throws E { throw (E) e; … Continue reading Throw checked exceptions like runtime exceptions in Java

Alvor: Static SQL analysis in Strings passed to JDBC

I have recently discovered this nice Eclipse plugin here: https://code.google.com/p/alvor/ It evaluates String, StringBuilder, StringBuffer, CharSequence and many other types passed to JDBC method for subsequent execution. It doesn't do a bad job at this, even if it is in beta mode. The rate of false positives that I have experienced is around 20% for regular SQL statements, and … Continue reading Alvor: Static SQL analysis in Strings passed to JDBC

Syntax for calling “super” in Java 8 Defender methods

This is a very interesting discussion. How to reference default methods from implemented interfaces throughout the class / interface hierarchy? Situation: interface K { int m() default { return 88; } } interface J extends K { int m() default { return K.super.m(); } // ^^^^^^^^^^^^ How to express this? } Solution ideas: K.super.m() super.K.m() … Continue reading Syntax for calling “super” in Java 8 Defender methods

Serious SQL: A “convex hull” of “correlated tables”

Now THIS is an interesting, and challenging question on the jOOQ user group: https://groups.google.com/d/topic/jooq-user/6TBBLYt9eR8/discussion Say you have a big database with lots of tables and foreign key references. Now you would like to know all tables that are somehow inter-connected by their respective foreign key relationship "paths". You could call this a "convex hull" around … Continue reading Serious SQL: A “convex hull” of “correlated tables”

You never stop learning about Oracle features

Oracle's name is no coincidence. It is truly an oracle, telling you mystical, secret things about your database. It may take great expertise and skill to optimally extract that knowledge from this monster. While it implements vast parts of the SQL:2008 standard, it ships with a lot of features no other database has, but which … Continue reading You never stop learning about Oracle features

SLICK, integrating SQL into Scala

Now it's official - even if version numbers are still preceded by a "zero" major release: SLICK has been publicly announced by Typesafe: http://blog.typesafe.com/introducing-slick http://finance.yahoo.com/news/typesafe-announces-scala-language-integrated-100000262.html http://java.dzone.com/articles/slicker-scala-stack-qa-martin SLICK stands for Scala Language-Integrated Connection Kit, which is more or less the Scala equivalent for LINQ-to-SQL. Note that I say LINQ-to-SQL, not LINQ in general, as Scala already has … Continue reading SLICK, integrating SQL into Scala

Survey about the Java 8 “default method” syntax

Influence the future of Java now! Participate in this official survey by Brian Goetz: https://www.surveymonkey.com/s/9VPJZQQ

MySQL Bad Idea #384

MySQL is a database of compromise. Compromise between running a production-ready relational database and being popular with all sorts of hackers - mostly the ones that don't really like SQL. And because they don't really like SQL, they choose MySQL, as MySQL is very forgiving. It is just as forgiving as their favourite language PHP, … Continue reading MySQL Bad Idea #384

The true spirit of Open Source

As an open source developer, I'm often asking myself why the hell am I going through all of this pain in my free time to deliver quality software, when I'm already doing this in my office?? Sure, it's fun, you can try out new things, deepen your knowledge in a specific field, it helps boost … Continue reading The true spirit of Open Source