List/Grid Java Subscribe to the RSS feed of category Java

How to create a memory leak
This is going to be a rather evil post – something you will be googling when you really wish to make someone’s life a misery. In the world of Java development memory leaks are just ...

Spring JMS, message automatic conversion, JMS template
In one of my projects I was supposed to create a message router that like all routers was supposed to take the JMS messages from one topic and put it into another one. The message itself ...

When Maven Dependency Plugin Lies
Problem: We had an integration test which creates a spring ClassPathXmlApplicationContext and while doing so the test blew up with a NoSuchMethodError. It turned out that we had conflicting ...

Why a synchronized StringBuffer was never a good idea
Introduction StringBuffer is a synchronized class for mutable strings. The main problem with making it synchronized is thatIt was usually used as a local variable so making it synchronized ...

Simulation of time consuming actions in integration tests
Quite recently in one of my projects I had a situation in which I needed to create an integration test for the application. That’s not very odd isn’t it? What was interesting ...

Spring with Maven
1. Overview This article will discuss how to setup Spring with Maven and will go over specific usecases of using Spring dependencies. The latest Spring releases can be found on Maven ...

Spring AOP in security – controlling creation of UI components via aspects
The following post will show how in one of the projects that I took part in we used Spring’s AOP to introduce some security related functionalities. The concept was such that ...

XStream – XStreamely easy way to work with XML data in Java
From time to time there is a moment when we have to deal with XML data. And most of the time it is not the happiest day in our life. There is even a term “XML hell” describing situation ...

Fault Injection with Byteman and JUnit
The time when our applications lived in isolation have passed long-long ago. Nowadays applications are a very complicated beasts talking to each other using myriads of APIs and protocols, ...

Install local jar with Maven
1. The Problem and the options Maven is a very versatile tool and its available public repositories are second to none. However there will always be an artifact that is either not hosted ...

