Category Archives: Java

This article is the follow up of Logging in Java (1/2). The first part explained what loggers are and attempt to compare some of the major loggers in Java. This second part will show you how to use them. Firstly with easy configuration, then with some more advanced one. If you are interesting in a […]

Double braces initialization Today, we are going to discuss a special case. It is called the “double braces initialization”. What is that?Usually when you start learning Java, you try to minimize everything, try to find the most concise syntax. I know one thing that used to upset me is the inability to declare and fill […]

Logging in an application has become mandatory, yet we had to wait until java 1.4 to see a native logging library packaged with the default JDK. Obviously, people did not wait for Java 1.4 to start coding their own logging libraries. This article aims to teach you the general purposes of loggers in Java, a […]

This article is about some special cases which can be faced using the @Transactional annotation. This article is here to warn you about some features you may not know. When is Spring triggering a rollback using @Transactional? The answer everyone wants to say is: whenever an exception is thrown. @Transactional public Long create(User user) { […]

This little article will show you what can go wrong during an application server update. Most of the time, the update goes smoothly. I mean, have you ever had a trouble upgrading from tomcat 5 to tomcat 6, then 6 to 7? As far as I am concerned, it usually works fine. Thus, I have […]

In java, the Bean Validation specification is defined by the JSR 303. Hibernate Validator is the reference implementation for this JSR. The validation API is available using the maven dependency: <dependency> <groupId>javax.validation</groupId> <artifactId>validation-api</artifactId> <version>1.1.0.Final</version> </dependency> At the time I am writing this article, the last version is 1.1.0.Final. This version has been used by Hibernate […]