Sie sind auf unserem Blog gelandet, herzlich willkommen! Hier finden Sie spannende Artikel zu den Themen java, OSGi, Eclipse, BND und vieles mehr. Schauen Sie sich zum Beispiel unsere Serie „Bits Of Java“ genauer an. Dort finden Sie neben den Grundlagen auch nützliche Tipps zur Lösung anspruchsvoller Probleme mit Java. Und nun: Viel Spaß beim Lesen und Vertiefen Ihres Wissens.
Recently, I wanted to build an OSGi application that should run on my RaspberryPi. So I wanted an easy way to test this application on the Pi. After some research I found the possibility to use a remote laucher in bnd. There are two parts necessary for that: the remote… [mehr]
The default implementation of the OSGi Jakarta RESTful Web Service Whiteboard implementation from Geckoprojects moves to the Eclipse OSGi Technology Project. [mehr]
We recently started uploading our bundles to maven central. To do that a trusted staging repository is needed (in our case sonatype). They perform certain checks, to make sure your artifacts meet the standards (like e.g. jars need to be signed) of maven central. BND can smoothly handle the the… [mehr]
Today we will continue our excursion into some of the newest features of the Java language. In particular, today is time for Pattern Matching for instanceof. This feature was already introduced with Java 14, with the goal of simplifying one of the most common pattern in Java. You have surely… [mehr]
We started this blog series with Java 11. This is the most recent LTS (long-term support) version of Java so far and it was released in September 2018. Since then, however, a lot of other versions have been released, and currently we are at Java 15, so I think it… [mehr]
We will start this new year with an episode dedicated to optionals in Java. What are optionals? Well, we can think of them as the Java way of expressing something that can be there, but that can also not be there: an optional indeed! Suppose you have a method which… [mehr]
Last week we talked about generics in Java. Today we will remain on this topic and discuss a few more things you can do with them! At the end of the last post, we said that generics are basically just java.lang.Object for the compiler, and that, indeed, after compilation, what… [mehr]
Today we will discuss a bit about the use of generics in Java, which have been part of Java since its version 5. But what exactly are generics? So, when you build a List object, for instance, you would do something like this: where, in between <> you specify the… [mehr]
Today we will see a slightly more complicated version of the use case we saw last week. We will always talk about services, but of configurable services. Use Case Imagine you have two or more implementations for the same service, and you have a consumer which needs one of your… [mehr]
Last week we discussed a bit about lambdas expressions and functional interfaces, and we saw that one of the built-in Java functional interfaces is the Comparator. It provides as functional method: which allows to compare two objects and returning an int, whose value depends on the result of such a… [mehr]
Data In Motion Consulting GmbH ist einer der Projektbeteiligten im Projekt: „5G-basierte V2X-Vernetzung zur Optimierung der Energieversorgung und des multimodalen Verkehrs in Jena und Umland“. Als eine von 10 potenziellen Regionen hat sich Jena im 5G-Innovationswettbewerb gegen die Mitbewerber durchgesetzt. Konkret geht es darum, in der Modellregion Jena den Ausbau… [mehr]
This week we are finally ready to start working on our first use case: how to create and launch a simple service component in OSGi. We will proceed as follows: we first describe how this can be done in a pure Java environment, and then we will move to OSGi.… [mehr]
This week we are going to discuss about lambdas expressions in Java. They are a way to write code in a more functional way, and they could be quite useful when you need to perform just a simple operation, and you do not want to write a dedicated method just… [mehr]
In the previous post of the series we started with a simple definition of OSGi, as an additional layer which can be put on top of Java, and provides a set of functionalities to help you develop an application as a \modular\ and \dynamic\ system. We also looked into the… [mehr]
This week we will discuss a bit what happens when there is something wrong with your Java application. There are two main groups of things that could go wrong in your code, and we can distinguish them based on, let's say, how early Java can detect the problem. In this… [mehr]
We at Data In Motion Consulting GmbH are currently working at the preparation of a course, so we came across to the need of making some presentations. I, personally, as coming from an academic environment, was used to prepare my slides using LaTeX. Its beamer package, in particular, is quite… [mehr]
Here we are with our first episode of this new series about OSGi. Before entering the details of our use cases, we first need to give a brief definition of what OSGi is, and what it has tried to accomplish over the years. The OSGi Alliance was founded in March… [mehr]
This week we are going to discuss Java enumerators. What are they? You can think of an enumerator as a way to define some special strings. Suppose, for instance, you want to implement a method that takes as input parameter a color name and returns to you whether this color… [mehr]
Today I gave a talk at the EclipseCon 2020 about the new upcoming OSGi Messaging Specification. We work on this specification for a while. The idea is based on one of our OpenSource Projects that is hosted on Gitlab: https://gitlab.com/gecko.io/geckoMessageAdapter The idea is to harmonize the API for asynchronous messaging.… [mehr]
With this post we would like to announce a new blog series, aimed to describe the world of OSGi. Data In Motion Consulting GmbH has been an OSGi Alliance member for many years now, and we also provide trainings for both developers and project managers, who want to start using… [mehr]
This week we will talk about another interesting feature of the Java language, annotations. What are annotations? Well, you can think of them like a convenient way to express meta data of your objects, where, with objects here, I mean not only Java objects, but also methods, fields, and also… [mehr]
This week we will briefly discuss one, relative new, feature of the Java language, which is the Java Platform Module System (JPMS). The JPMS was introduced in Java 9, with the purpose of introducing a new encapsulation level and allowing developers to build their applications in a more modular way.… [mehr]
Last week we started looking into the difference between method overriding and method overloading. This episode will cover, instead, the difference between method overriding and method hiding. We will not go into all the technical details of method overriding, since we already discussed them. What's important to remember from last… [mehr]
In this episode we will discuss a bit the difference between method overriding and method overloading. These are two features that Java supports, under certain conditions, and that can be misleading at a first glance. Let's start with the simpler one (at least for me), method overloading. Method Overloading A… [mehr]
In this episode we will discuss the meaning of the static keyword and we will see where it can be used in your code. There are various places in your code when you can use the static keyword. Let's see them. static fields: when you mark a variable as static… [mehr]
In this episode I would like to discuss how to pass from an array to a list and vice versa, and which are the things to keep in mind once the conversion has been done. From \list\ to \array\: to pass from a list to an array you can simply… [mehr]
In this episode we will talk about the Java wrapper classes for the primitive types. But first, let me share with you some wonderful news: this week I passed the Orcale Java SE11 Programmer I! Writing this blog hepled me a lot to memorize and to clarify the concepts. But… [mehr]
This week I would like to talk about two methods of the Arrays class which I was not familiar with, and whose logic can be a bit tricky: Arrays.binarySearch and Arrays.compare. But first, let me briefly review what an array is. An array is a memory section which is reserved… [mehr]
Today we will discuss about the String Pool. What is it? Well, in the last post we talked about the fact that String are immutable, and that every time you manipulate a String you are actually creating a new object in memory, which is, for sure, not the most efficient… [mehr]
In this post I would like to review the difference between String and StringBuilder. The main difference between the two is that String is immutable, StringBuilder is not! What does immutable mean? Well, it simply means that when you try to manipulate an immutable object what you are actually doing… [mehr]
This week's topic will focus on the use of labels in loops. Did you know that you can use labels to identify your loops? I, for sure, did not know that! It's true that is not very common, because in most of the cases they decrease your code readability, which… [mehr]
This week I will try to describe the switch statement, focusing in particular to which kind of variables are allowed to be used with such statement. This is one of the Java features that changed a lot over the different releases, thus I hope also some of the most experienced… [mehr]
Before starting preparing this exam, I had always used the logical operators && and , which you all probably are familiar with. For those who are not, both are binary operators, where the two operands are boolean expressions. The first one returns true if and only if both the operands… [mehr]
This week we will talk about numeric promotion. With this term we identify the process for which the compiler promotes a numeric type to a different one. As you probably already know, this can happen using casting. On the other hand, there are some cases in which the compiler automatically… [mehr]
This week I would like to talk about what happens when you force a value, which is outside the range of a certain primitive type, to be of that type. That sounded like a tongue-twister, didn't it? Let me remind a few concepts before. You are probably all familiar with… [mehr]
In this episode we will talk about one of the features that distinguishes Java from a lot of other programming languages out there: the concept of garbage collection. In other languages, such C for instance, you should take care of disposing objects that you do not need anymore, in order… [mehr]
In this episode I would like to talk about the var keyword, which has been introduced in Java 10, and can be used instead of the type under certain conditions. When declaring a variable in Java, we need to specify what type of variable we want, right? Well, we could… [mehr]
As anticipated in my last blog, I would like to start a series of posts to share some features of Java 11 I am learning while studying for the Oracle Certification (JavaSE-11 Programmer I). This week we start with the one-line-source-code. As you probably all know, the standard way to… [mehr]
It has been almost one year and a half since I arrived at Data In Motion, where I started my career as a software developer. I had some programming experience from my academic background, but I never used Java before. As the majority of the developers do, also at Data… [mehr]
Nowadays Machine Learning is one of the coolest topics when dealing with data analysis and software development, and everyone who can throw some Machine Learning related concepts in a conversation is seen immediately under a brighter light. Indeed Machine Learning is a really powerful tool, and can help solve a… [mehr]
NOTE: If you are looking information about the bnd-maven-plugin or bnd-export-maven-plugin this is the wrong article. Have a look here and here to find examples and the documentation of the plugins. Preamble This article will describe the following things: The difference between the aQute.bnd.repository.maven.provider.MavenBndRepository and the aQute.bnd.repository.maven.pom.provider.BndPomRepository How to deploy… [mehr]
Running bndrun files using gradle Bnd provides gradle tasks to run bndrun files and start an application. When listing all gradle tasks using gradlew tasks, you will find the bndrun tasks in the exports section of the list. Usually the tasks look like run. . If you want to start… [mehr]
The current ConfigurationAdmin specification can be found here: https://osgi.org/specification/osgi.cmpn/7.0.0/service.cm.html One feature of this specification is the Configuration Plugin. An implementation can be used to participate in the configuration process. You can e.g. add new properties or modify existing properties for a configuration. A use case could be to substitute credential… [mehr]
We recently updated our documentation for the Gecko.io runtime project. The Gecko.io Runtime contains small helpers to improve the handling of your OSGi application in production environments and development. The org.gecko.templates project contains bndtools project templates, to ease the creation of project within your Eclipse IDE. Our org.gecko.runtime.boot registers some… [mehr]
Before we start: The Resolver works with the Requirements and Capabilities of OSGi and I strongly suggest to have a look at them, if you work with the Resolver. To give an Answer to the question above, we take the following example output: Lets take it apart and look what… [mehr]
We are developing a tool which allows, once an EMF model is created, to test and validate it in a reliable and efficient way. We did that by exploiting the potential of the Alloy Language and its powerful Alloy Analyzer. When you build a model to describe a process or… [mehr]
Run ./gradlew export. If the Build was successfull you will find the the result in generated/distribution/ .export directory. Note, that the bndrun must reside in a bnd project with a bnd.bnd in it. For more FAQ see: The Gecko Documentation Project by Ilenia Salvadori, Mark Hoffmann, Jürgen Albert [mehr]
We just started a documentation project on Gecko.io Gitlab. It started with a FAQ / Nive to know collection of information about OSGi, bndtools, Eclipse we want to share. This is what we have till now: Plain OSGi I want to use a LDAP style target filter as service property.… [mehr]
Die weltgrößte Medizinprodukte-Messe, die Medica 2019 in Düsseldorf ist nun zu Ende. Für die Data In Motion Consulting GmbH war dieses Jahr eine Premiere. Wir waren auf dem Gemeinschaftsstand Thüringen mit vertreten und präsentierten den ersten Prototyp des DIamAnt Projekts. Technologisch basiert dieses System auf dem Industriestandard für modulare Software… [mehr]
BND is a nice build tool, but in some cases it makes actually trivial things, seem impossible or at least not really obvious. Doing RELEASE and SNAPSHOT Builds is one of these things. Thus, here is a quick guide on how this can be done. By default OSGi uses Semantic… [mehr]
The Eclipse Remote Application Platform is an Eclipse project for enabling RCP application for the web or mobile usage. It can be used in OSGi or Servlet containers such as JEE. There is a good tooling based on the Eclipse tooling. We got a request from a customer, if it… [mehr]
Data in Motion Consulting als Implementierungs-Partner Am 1. April 2019 startete das Forschungsverbundprojekt „Dezentrale Informationsarchitekturen in medizintechnischer Anwendungsdomäne in Thüringen“, kurz DIamAnT. Das Projekt ist vom Thüringer Ministerium für Wirtschaft, Wissenschaft und digitale Gesellschaft gefördert. Ziel ist es mit Hilfe der Blockchain-Technologie Arbeitsprozesse veränderungssicher zu dokumentieren. Schwerpunkt liegt dabei auf… [mehr]
Part 1: What can go wrong, will go wrong! Over the years we have been part of a couple of migration efforts to a more modern infrastructure and architecture. We have seen the good, the bad and the ugly side such projects bring with them. All of them could be… [mehr]
As we switched our wordpress to https, we encountered some mixed-content warning in the browsers. https://support.mozilla.org/en-US/kb/how-does-content-isnt-secure-affect-my-safety?redirect=no The reason is, that there are some links in the page, that refer to http instead of https. This often applies to image links. An easy way to fix that, was to show the… [mehr]
We want to share a small study we made when trying to optimize the queue policy for a messaging system. We wanted to find an optimal configuration for a messaging system in terms of buffer size, number of threads and queue blocking policy, or at least to get a feeling… [mehr]
If you use WordPress there are a lot of nice small plugins. The Login LockDown is one of them. It is not the newest, but its has a nice feature. If it determines some wrong login tries, it blocks the IP address for a certain time. This plugin is configurable… [mehr]
About one and a half years ago we switched all our projects from using PDE together with Maven Tycho to bnd. The increase in development speed we reached was immense. Additionally bnd automatically pushed us towards writing better OSGi software. Over the time we experienced a lot of fallacies PDE… [mehr]
Last week we had a talk at the EclipseCon Europe 2018 in Ludwigsburg, presenting one of our OpenSource projects. It is called Gecko EMF and available here: https://gitlab.com/gecko.io/geckoEMF The Slides for the talk can be found here: EMF and OSGi What is Gecko EMF? It is an addition to EMF… [mehr]
A while back, we reactivated our Nexus and wanted to use bnd to release to an OBR and an the Nexus at the same time. As usual, we have an automated build handled by jenkins, which does a snapshot build from our develop branch and a release build from changes… [mehr]
If you are using the brand new Eclipse Photon on an Ubuntu 16.04, it can happen that you encounter some rendering issues like the one below. I start my Eclipse in Ubuntu using the .desktop files with the following environment variable: SWTGTK3=0. This is obvious not necessary any more. You… [mehr]