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 »
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 »
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 »
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.
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.
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.
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.
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.
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.
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.
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).
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.
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?