Singleton with arguments

Had a very unusual requirement where I needed to share singleton between projects that requires initialization arguments. These arguments are different based on what server it is started. In applications using CDI this was very easy but not all where using CDI and a lot of the projects where not under my control they where simply using the lib. Thread safty was also a concern and I wanted to avoid using synchronized. Here is the solution I came up with.

Into the Future Thread - Part 2

Continuing with execution flow of Futures and thread. See Part 1 if you have not. I would like to highlight when future.get() completes in different scenarios. Firstly I know it is not best practice to use Futures in this way but I think it is still important to understand how the internals work.

Into the Future Thread - Part 1

Just wanted to highlight what thread is used in regards to Java Futures in Java 8. The flow of execution. Basicly the differences between the normal and Async function in futures.

JOOQ MySQL/MariaDB and the duplicate column name

Hit a interesting issue today using MariaDB with JOOQ. I have a project that can be configured to use different underlying databases depending on client requirements and I use JOOQ to simplify this for me. One of the tables are structured as follow:

Dagger 2 Maven Config

Just a quick post on how to setup Dagger 2 with maven to compile without messing with eclipse settings. Just remember to include target/generated-sources to your class-path.