Tag Archives: java

Testing equals() with Guava

I’ve long held the opinion that Guava belongs on every Java classpath because its design and the quality of its implementation surpass other comparable utility libraries (and sometimes even the JDK). Guava’s testlib is pretty cool, too, even though it’s … Continue reading

Posted in java | Tagged , , , | Leave a comment

Visualizing Package Dependencies

Managing module or package dependencies is an important design activity that helps to keep a software project maintainable. Visualizing these dependencies is a good way of getting a first impression on a project and for exposing design problems. In this … Continue reading

Posted in java | Tagged , , , | 5 Comments

Maven Archetypes Updated!

Two years ago, I published a Maven archetype for Hadoop that turned out to be quite popular, judging from the comments I received and the access logs on my server. Today I’ve updated it to use the latest version of … Continue reading

Posted in java | Tagged , , , , | Leave a comment

Hudson vs. Jenkins Revisited

When the Hudson/Jenkins fork was announced earlier this year, the case seemed pretty clear. There were heroes from the Open Source community, among them Hudson’s original author, and there was everybody’s favorite villain, Oracle. Back in February, I would have … Continue reading

Posted in tools | Tagged , , , , | 9 Comments

Writing Hamcrest Matchers

JUnit 4 introduced a fancy DSL based on the Hamcrest framework for expressing assertions. JUnit ships with the most important matchers and you can always add Hamcrest to your classpath if you need more. Sometimes no existing matcher fits your … Continue reading

Posted in java | Tagged , , | Leave a comment

JBoss: Running Multiple Instances on One Host

Occasionally, it’s useful to run multiple JBoss instances on one machine. Like with any network server, this is difficult because only one application can bind to a port at any given time. You have to assign different sets of ports … Continue reading

Posted in java | Tagged , , | 2 Comments

Excluding Pages From Authentication

Java’s Servlet spec allows web applications to delegate authentication and authorization to the servlet container, a mechanism known as container-based security. A lot of people use it for in-house applications or web services because it’s simple and containers like Tomcat … Continue reading

Posted in java | Tagged , , , | 16 Comments

Enabling JMX Access on Tomcat

I think every Java application in production should enable JMX access. Without JMX, there’s little chance to debug JVM-level problems, especially those related to out of memory errors. Even if your application doesn’t export its own MBeans for monitoring, you … Continue reading

Posted in java | Tagged , | 8 Comments