Author: Tillmann Seidel

[caption id="attachment_11460" align="alignright" width="240"] Via Creative Commons from OliBac[/caption] One option for detecting memory leaks in Java is the analysis of heap dumps. The first step is to create an HPROF heap dump from the running Java application, the second is the analysis of the dump with an appropriate analysis tool like jvisualvm or Eclipse Memory Analyzer (MAT). Wanting to do the first step for...

Read More

Recently I wanted to use the good old ServiceTracker to get access to OSGi services registered under a specific interface and matching a given filter. I was surprised to discover that there is no constructor for the ServiceTracker that allows the specification of a class name and a filter. A quick look into the OSGi specification revealed: the list of the service interfaces is made available...

Read More

Working with tables or trees with more than a handful of rows, you quickly find that you need a way to filter or search for content, otherwise they become unusable. The Eclipse workbench offers an out-of-the-box component named FilteredTree which adds an input field to an SWT tree where filter strings can be entered by the user. However, support for SWT tables is missing. This...

Read More

Recently I scanned the source code of our current Eclipse RCP/RAP project for occurrences of the Listener (or Observer) pattern. I found no less than 6 (!) different implementations and decided to unify them into one. When researching the implementation options (and the Java world has many to offer), I found an aspect of Listener programming that is usually not mentioned by internet resources. But...

Read More

JFace Data Binding allows you to attach only one validator to a binding. Putting all constraints into one validator is essentially bad design and compromises reusability. Here's a trick for dealing with this limitation of the data binding API and at the same time, keeping your validators small and reusable. When binding a source observable to a target observable in JFace Data Binding, it is possible...

Read More

Apache CouchDB offers high availability, excellent throughput and scalability. These goals were achieved using immutable data structures - but they have a price: disk space. CouchDB was designed under the assumption that disk space is cheap. Though it is indeed getting cheaper and cheaper, it is not infinite. Here's a tip to reduce CouchDB database files' disk consumption. When a CouchDB document is updated, the new...

Read More

When adopting the Whiteboard Pattern for one of our Eclipse RAP based web applications, we stumbled upon a problem concerning the session scope of events. Here's how we solved it. The Whiteboard Pattern in OSGi development is an alternative to the event listener or Observer pattern commonly used in Java programming. In an OSGi environment, the Whiteboard Pattern is widely considered to be the better choice...

Read More