How to eliminate a parameter boom

Hello folks. Today I want to write about a little trick I learned. If you are working with legacy code and you don’t have the chance to eliminate core design problems, you can use this little pattern to help you out. Problem Problem is that you have a class that has a gazillion collaborators and at some point in time one of the clever devs thought it would be a cool idea to do dependancy injection via the constructor. We all know that doing this makes the class immutable which is very good for a number of reasons. However it doesn’t provide a flexible solution if you want to leave out one or two collabs. For that your would have to create Adapter constructors and chain them upwards which would get very ugly very fast. While using JavaBeans getters and setters can leave your class in a harmful state like not at all or partially initialised. ...

October 9, 2012 · 3 min · hannibal

JMS Connection setup and Framework

Hello chumps. Today I want to write about jms connection testing with a small framework. I wrote a small thing using a factory object model. It’s a lead, a proof of concept. You can use this to go onward. First, let’s begin with the JMS connection it self. JMS Connection First rule of thumb is: “Don’t wait for a response when dealing with JMS queues.” How so? Because, a JMS queue is asynchronous so you wont get back anything. There are however two ways of checking if it was a success or not. ...

March 4, 2012 · 5 min · hannibal