Keeping your integration tests isolated from each other

In this blog post I will describe the difficulties that occur with integration tests regarding isolation, what problems this can lead to and how you can address these problems in an in-memory More »

Try the Dutch OpenStack Swift with JavaSwift JOSS

JOSS and OpenStack Swift. All very nice, but with no service provider in the Netherlands, a bit of a moot point. Not any more, though. If you have your e-business in the More »

Mockito / PowerMock vs JMockit

If you are on the verge of choosing between Mockito and JMockit, this article will help you understand why you should pick JMockit. When aiming for a Java codebase which is well-covered More »

Recovering from database constraint violations in Java

It is very difficult to recover from a database constraint violation in Java applications, due to the lacking SQL exception API. JaRB offers an exception translator that converts any constraint related SQL More »

The dark secret of CRUD applications using Spring MVC

Do you use Spring MVC with an OpenSessionInView filter and your Entities also as Data Transfer Objects, like in a basic CRUD setup? Then you may have exposed more of your model More »

 

Keeping your integration tests isolated from each other

In this blog post I will describe the difficulties that occur with integration tests regarding isolation, what problems this can lead to and how you can address these problems in an in-memory database environment.

Try the Dutch OpenStack Swift with JavaSwift JOSS

JOSS and OpenStack Swift. All very nice, but with no service provider in the Netherlands, a bit of a moot point. Not any more, though. If you have your e-business in the Netherlands, it might be interesting for you to know that OpenStack Swift is now available here, brought to you by CloudVPS.

Mockito / PowerMock vs JMockit

If you are on the verge of choosing between Mockito and JMockit, this article will help you understand why you should pick JMockit. When aiming for a Java codebase which is well-covered with unit tests, you are certain to run into mocking frameworks. The two most popular ones are Mockito and JMockit. Mockito, the successor to the older EasyMock, teams up with PowerMock to have complete functionality. JMockit, an ambitious young library aiming for nothing less than taking Mockito’s place, works all by itself.

Recovering from database constraint violations in Java

It is very difficult to recover from a database constraint violation in Java applications, due to the lacking SQL exception API. JaRB offers an exception translator that converts any constraint related SQL exception into a rich constraint violation exception, providing all desired information by API. It is even possible to map constraints to a custom exception, greatly simplifying the recovery of violations.

The dark secret of CRUD applications using Spring MVC

Do you use Spring MVC with an OpenSessionInView filter and your Entities also as Data Transfer Objects, like in a basic CRUD setup? Then you may have exposed more of your model than you’ve anticipated.

The easy to use Databinding of Spring MVC will, unconfigured, bind any property in the incoming POST to your domain model, including those not present in the form. To make matters worse, it is also possible to navigate property paths and modify other objects in the domain model. They will get saved too if you have a transaction because of Hibernate’s automatic dirty checking. If you use Spring Roo with Hibernate and Spring MVC this is the default behavior.

In this blogpost, I will demonstrate this feature and show you how to fix it.

JOSS and Cloudie join forces @ javaswift.org

Providing Java tools for dealing with OpenStack Storage aka Swift, that is the mission of javaswift.org. Erik Hooijmeijer and Robert Bor have decided to join forces by combining JOSS and Cloudie into this single open source organization.

Liberating data from Clarion TPS files

Migrating a customer from a legacy system to his shiny new one never goes smoothly. In this case the customer had a huge amount of data in a Clarion based system with the tables stored in proprietary TPS (TopSpeed) files. In this blog post I’ll discuss the various ways of liberating data from their TPS container and dive deep into the internals of the TPS file itself. Finally I present a TPS to CSV converter.

On staying DRY with Spring config

This article shows that using java to configure spring is much more flexible than
to use xml. The article gives an example of how one could proceed to setup a lot
of configuration once and for all (i.e. for all future projects).

Force resource reloads after deploying your web application

There you go, deploying version 1.2 of your application. Tests ran smoothly, build succeeded. All is well. That is, until you get the first customer calls that the application “is broken badly” and “looks like shit”. Sigh, not again. “Just ctrl-refresh your browser, sir” or worse, “Just empty your cache, ma’am”. Stop blaming the users, you dork! There is an easy way out and here’s how.

Gotta Catch ’Em All – 100% test coverage

In this day and age, it is a generally accepted best practice that unit testing is a good thing. The way to check the degree of unit testing in a code base is to measure the test coverage. However, 100% test coverage is often frowned upon. It can be quite expensive, sometimes even impossible to reach this exalted state. Is it worth it? Can it be done?