All the code on this site is now hosted at gist.github.com!
The following is the source code for a javax.management.ObjectName serializer that recursively serializes and is a good example of how to avoid circular references. This is specifically aimed at dumping the DomainRuntimeServiceMBean and the RuntimeServiceMBean servers from Weblogic 11g, but it should work with any JMX standards compliant MBServer implementations.
As detailed in this question on StackOverflow.com, I am dynamically loading data into a series of dropdowns via AJAX. The problem is I want the user to be able to select the first element in the list, but it becomes the default selection and you can’t select it until you have selected some other item… Read the full article
I can’t count how many times I have looked at some code that gets it so wrong in so many ways and is completely excused because the team or individual is putting in a tremendous effort, doing it wrong. Of course the doing it wrong part gets left out, but the fact remains, that they… Read the full article
I found a small template snippet that worked great for getting the length of an array in C++ without having to store the size in a separate variable. But one thing wasn’t working, calling that template function on an array passed into a function/method as an parameter. The helpful denizens of stackoverflow.com came to my… Read the full article
This some considerable noise on the internet about Fluent APIs and using them. There was a question on stackoverflow.com about how to enforce calling all the required methods to guarantee you fully materialize an object when using a Builder Pattern with a Fluent API approach. The appropriate way to achieve this is through Interfaces that… Read the full article
Where is final used? There are a lot of Java developers that don’t understand the keyword final. The keyword final is one of your greatest allies in writing bug free maintainable code. It makes reading code much more deterministic and step debugging a breeze. And it makes your code side effect free. Side effects are… Read the full article
Certifications show you can study and take a test They don’t demonstrate that you actually comprehend any thing that was on the test. In the worse case certifications can turn off a lot of hiring managers as they got burned in the dotCom bubble boom with unqualified staff but were “certified”, it looks like someone… Read the full article
I have released my first Maven artifacts to the Central Repository through Sonatype’s Open Source Nexus Server. You have to jump through some hoops to get everything just right to be able to release to the Sonatype Nexus repository, and I could not find all the information I needed in one place so I will… Read the full article
Make your pom.xml dependency entry for Jasper Reports look like this If you don’t use the excludes directive you get the java.lang.NoSuchFieldError: reportUnusedDeclaredThrownExceptionIncludeDocCommentReference error.