tips Tag

One common task when working with CouchDB is to find out whether a document with a given ID exists. A simple solution is to send an HTTP GET request with the ID to CouchDB and check the response's HTTP status code. A GET request, executed, for example with curl curl https://localhost:5984/mydatabase/mydocumentid will return the document with an HTTP status code 200 if it is successfully found. If the...

Read More

Defining APIs is crucial to maintaining modularity. OSGi defines the concepts necessary for API definition such as a service concept and package visibility. However, pure OSGi is not enough to really maintain an API and its potential usages. There are several cases in an API definition where it is required to do more than restrict the accessibility to packages. As an example, a public package...

Read More

The "Problems" view in Eclipse lists errors and warnings in the workspace. In its default settings this view is not entirely helpful, but it is highly customizable. Today I want to show you how you can configure this view to shift the focus to the interesting errors and warnings in your current area of work. Open the "Problems" view menu by clicking on the little triangle...

Read More

[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

For beginner developers is very important to have a fast start in a new technology. RAP Tools provide three PDE templates from its version 1.0, but all of them are based on the Eclipse workbench model and its extension points. Starting from RAP version 1.5, it's possible to create a lightweight OSGi applications using RAP’s widget toolkit. That's why we decided to replace two of...

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