Latest Content

Finally, Rollback Your Transaction

Lately, I've been working with code that exhibits a fairly poor practice: programmatic transactions (namely Spring) don't always get committed or rolled-back, even though the code appears correct. Consider the following contrived scenario: ... read more

No ConcurrentHashSet? No Problem

The JDK provides several concurrent Set classes, each with their own application, but it does not provide a ConcurrentHashSet. Using the Collections utility class, however, such a structure may be created. ... read more

The Concurrency Of ConcurrentHashMap

Java's ConcurrentHashMap is an excellent point of study when learning about Java's Memory Model. It employs numerous techniques to provide lock-free reads while still guaranteeing safe publication of objects. This article represents my attempt to take the magic out of the ConcurrentHashMap implementation. ... read more

Impact Of Local Variable Declaration Location

Does the location of a local variable's declaration result in performance changes of a method? For example, will a String variable, s, declared outside of a loop exhibit "better" performance than when declared inside a loop? In Java, looking at a class' bytecode explains, irrefutably, why the answer is ... read more
7 8 9 10 11