Java Tag

The post "Automated installation of Virgo with Docker" described how to build and run a Docker container with Virgo inside. Today I'll describe an easy way of continuously deploying applications into such a Virgo running inside an isolated Docker container. In a regular Virgo installation we would simply drop our application bundle into the pickup folder of the targeted Virgo instance. We could allow the Docker container...

Read More

Earlier this year in June we released the 3.0 version of the OSGi JAX-RS Connector together with JAX-RS 2.0. Since then a lot has happened in the project and we decided to do a 3.1 release. Below are the important features and changes that made it into 3.0 and 3.1. If you're not familiar with the connector, these articles will get you started: Introduction, Consuming...

Read More

The Java compiler requires local variables of enclosing contexts referenced in anonymous classes (so-called captured variables) to be final. What if the anonymous class wants to alter the value of the variable, i.e. requires the variable to be mutable? This post shows different ways how to achieve that. The problem Let's assume we have a UI containing a button and a message to be displayed. The message...

Read More

It is a common procedure to read the initial configuration of a classic Java program from a file system properties file. Once the program is up and running, changes made to the configuration will be ignored unless you deliberately watch for changes to the properties file. OSGi runtimes provide a ConfigurationAdmin[1] to manage your initial configuration and handle changes during runtime. With Eclipse Gemini Blueprint[2] it is...

Read More

Today we are proud to release Tabris 1.1. Since the 1.0 release we have focused on making Tabris even more robust and made improvements such as a whole new TabFolder implementation for the Android client and a new Tree implementation for the iOS client. Of course, besides robustness and bug fixes we have added many new features. In this post I'd like to show you the new...

Read More

[caption id="attachment_17278" align="alignright" width="256"] By Pöllö (Own work) [CC-BY-3.0], via Wikimedia Commons[/caption]Did you ever look at a colleague's Java source code file which contained mixed spaces and tabs for indentation, making the code completely unreadable? Or did you ever try to compare two versions of a Java file where the line endings changed, obfuscating the one line of code that really changed? This post shows...

Read More

A few weeks ago a friend of mine enthusiastically told me about Docker[1] in a lunch break. Yesterday he supported me in creating my first Dockerfile and it was an amazing experience I must admit. But let's start at the beginning. What is Docker? Docker is a Linux Container Runtime, that runs Unix processes with strong guarantees of isolation. Under the hood Docker uses LXC[2] (LinuX Containers) which...

Read More

Lately I had a discussion about setters that have been introduced for the sake of testability. Just to be able to replace the actual collaborator with a stub or mock. The discussion went something like this: S: "We could use a dependency injection in conjunction with the @Inject annotation with a container like Spring to avoid introducing protected setters for tests only." H: "But, isn't that a lot...

Read More