About Marco Castigliego
List/Grid Author Archives Subscribe to the RSS feed of Marco Castigliego

Building smart Builders
When building an API, you should always think about who is going to use it. When the API is simply and clear to use, then the users are happy. When the users are happy then everyone ...

Even in the jdk there is bad code
Java 7, TreeSet and NullPointerException. Recently I tried to compile with java 7 a project developed with java 6. Lot of fun happened during tests execution, tests that in java 6 were ...

Easy testing SLAs on distributed components with grep4j
So your distributed architecture looks something like the picture below and you just have received a requirement from the business to make sure that the SLAs of the messages sent by ...

Pool of ssh connections using Apache KeyedObjectPool
I found the org.apache.commons.pool extremely useful and robust, but not well documented. So, I’ll try to help a bit here explaining how to use an Apache KeyedObjectPool. What ...

Chain of responsibility using Spring @Autowired List
There is a way in Spring 3.1 to auto populate a typed List which is very handy when you want to push a bit the decoupling and the cleaning in your code. To show you how it works, I ...

JUnit4 Parameterized and Theories Examples
I always relied on TestNG to pass parameters to test methods in order to give a bit of flexibility to my tests or suites. However, the same flexibility can be achieved using JUnit4. To ...

JBoss HornetQ for Kids, Parents and Grandparents – Chapter 1
It’s now almost 4 years that I’m working with HornetQ and I think it’s time to share part of what I learnt so far. The main purpose of this post is not to rewrite the official ...

Software Development tips and tricks
These are just some tips and tricks I learnt over my career that I’d like to share. This list does not contains silver bullets and it doesn’t pretend to be complete or be ...



