First post
I called my blog java hell for a simple reason. Since I began developing in Java, things are getting more and more complicated along the way. Frameworks like Spring, hibernate, EJBs and others...
View ArticleObject validation by annotations with the OVal framework
OVal is a validation framework for any kind of java objects. For example when you want to validate a JavaBean you just have to annotate its properties like this :public class object { @NotNull...
View ArticleDependencies injection with Spring annotations (@Repository, @Service,...
One of the big downfall with frameworks relying on XML configurations file is that they are not synchronized with your code. For example, if you are doing a refactoring of your code like renaming a...
View ArticleHow to validate a XML document from a XML schema using...
Since 1.5, you can validate a XML document from a XML schema using the javax.xml.validation.Validator object.Here's a snippet of code showing how to use this validator.import...
View ArticleUsing the Singleton Design Pattern in a multithreaded environment
Let's take a look first at the definition of the Singleton Pattern. The Singleton Pattern ensures a class has only one instance, and provides a global point of access to it. Here the implementation of...
View ArticleUsing the iBATOR eclipse plugin for iBATIS code generation
This tutorial explains how to use the iBATOR eclipse plugin 1.2.0 for iBATIS. iBATOR is a code generator for iBATIS. iBATOR will introspect one or more database table and will generate iBATIS artifacts...
View ArticleGood unit testing with JMock 2
Sometimes it can be difficult to unit test objects like services which can return multiple errors. A good unit testing strategy is to test every part of your code. JMock can help you do that by mocking...
View ArticleValidation of nested properties with Oval 1.3x
When I used Oval for the first time I didn't realize right away that Oval didn't validate nested properties. At the beginning of the project I was working on, I had simple objects with simple types...
View ArticleEntreprise Integration Pattern with Apache Camel 2.0
Apache Camel is an open source messaging routing framework based on the enterprise integration pattern described in the book of the same name written by Gregor Hohpe and Bobby Woolf.Apache Camel can...
View ArticleA simple example of the State Design Pattern
Here's the formal definition of the state design pattern :The State Pattern allows an object to alter its behavior when its internal state changes. The object will appear to change its class.The UML...
View ArticleIntegration testing with maven 2.0
One thing to keep in mind is that unit tests are not integration tests.The characteristics of unit tests are :- They test your code in isolation- They must be fast because they have to be run a lot of...
View ArticleTesting private methods using Reflection
- What about testing private methods ? - Hum... You can't because they're private dummy.- And what about using reflection to make them accessible ?Because we don't have access to private methods, we...
View ArticleIntroducing the Builder Design Pattern
Static factories and constructors have limitations when dealing with objects with large numbers of optional parameters. A classic solution is to use multiple constructors. The first constructor will...
View ArticleAnnotation driven Caching with EhCache and Spring
Caching is the key of fast applications. The Spring modules framework provides us with an easy way to cache the return of our methods using java 5 annotations.Here's an example :ehCache.xml...
View ArticleMonitoring EhCache with JMX and Spring
EhCache provides an easy way to manage your caches with JMX. The ManagementService class is the API entry point. You can easily integrate it in your Spring configuration files.Here's how you can do it...
View ArticleManaging and sharing your eclipse configuration with Pulse
Pulse is a tool designed for development teams to share your eclipse configurations. You can create various profiles based on known eclipse builds and add your own plugins from the pulse catalog or an...
View ArticleReleasing a multi-module project using the maven-release-plugin
To create a release the maven-release-plugin will execute 2 steps: prepare and perform. Let's first describe those steps.Prepare the releasePreparing a release executes the following steps:Check that...
View ArticleBe warn, The BigDecimal stripTrailingZeros method could have you fired.
Not enough people are aware of the flaws of the oracle jdbc driver when using java 5 and BigDecimal (bug# 5527479 and it is fixed in 10.2.0.4). You can see a full example on this thread of the...
View ArticleThe 248 days oracle 10g bug
It was a a day like another at the office. I was working on my software trying to improve it. I was pretty confident that this day will be fine and I could do the work I have to do without being...
View Article
More Pages to Explore .....