Blog posts tagged with "blog"

  • How to publish NPM packages to Nexus

    If you want to publish your own NPM repositories to your Nexus, this guideline contains a set of collected resources for you. Just follow the steps below. The first step includes the setup of your Nexus. If you have already done this you can start reading at step 4 where... [more]

  • Mockito#mock causes NoClassDefFoundException in OSGi

    Today I migrated some of our OSGi integration tests in our bnd workspace to the OSGi-Test support. We already used our own wrapper test classes, to deal with services, service availability and configurations. With the great initial work and some support of a good friend, most of our existing features... [more]

  • Upload to maven central with individually versioned bundles

    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... [more]

  • Bits of Java – Episode 27: What’s new in Java? (continued)

    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... [more]

  • Bits of Java – Episode 26: What's new in Java

    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... [more]

  • Bits of Java – Episode 25: Optional in Java

    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... [more]

  • Bits of Java – Episode 24: Bounded and Unbounded Generics in Java

    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... [more]

  • Bits of Java – Episode 23: Generics in Java

    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: List<String> names = new ArrayList<>(); where, in... [more]

  • OSGi in a Nutshell: Working with service configurations

    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... [more]

  • Bits of Java – Episode 22: Comparator vs Comparable

    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: int compare(T obj1, T obj2); which allows to compare two objects and returning an int, whose value depends on... [more]

  • OSGi in a Nutshell: Launch a simple Service

    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.... [more]

  • Bits of Java – Episode 21: Lambdas Expressions and Functional Interfaces

    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... [more]

  • OSGi in a Nutshell: What is OSGi? (continued)

    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... [more]

  • Bits of Java – Episode 20: Java Exceptions

    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... [more]

  • Using Pandoc to Make Beautiful LaTeX Presentations

    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... [more]

  • OSGi in a Nutshell What is OSGi

    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... [more]

  • Bits of Java – Episode 19: Java Enumerators

    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... [more]

  • Talk OSGi Asynchronous Messaging at EclipseCon 2020

    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.... [more]

  • OSGi in a Nutshell

    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... [more]

  • Bits of Java – Episode 18: Java Annotations

    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... [more]

  • Bits of Java – Episode 17: Modules in Java

    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.... [more]

  • Bits of Java – Episode 16: Method overriding vs method hiding

    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... [more]

  • Bits of Java – Episode 15: Method overriding vs method overloading

    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... [more]

  • Bits of Java – Episode 14: The static keyword

    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... [more]

  • Bits of Java – Episode 13: From Arrays to Lists and vice versa

    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... [more]

  • Bits of Java – Episode 12: Wrapper Classes

    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... [more]

  • Bits of Java – Episode 11: Compare and Search in Arrays

    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... [more]

  • Bits of Java – Episode 10: String Pool

    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... [more]

  • Bits of Java – Episode 9: String vs StringBuilder

    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... [more]

  • Bits of Java - Episode 8: Labels in Loops

    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... [more]

  • Bits of Java – Episode 7: The switch Statement

    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... [more]

  • Bits of Java – Episode 6: Logical Operators and their Short-Circuit Version

    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... [more]

  • Bits of Java – Episode 5: Numeric Promotion

    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... [more]

  • Bits of Java – Episode 4: Overflow and Underflow

    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... [more]

  • Bits of Java - Episode 3: Garbage Collection

    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... [more]

  • Bits of Java – Episode 2: The var keyword

    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? int number =... [more]

  • Bits of Java – Episode 1: One-line-source-code

    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... [more]

  • Bits of Java

    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... [more]

  • The OSGi and the universal Taskmanagment of the City of Jena

    How OSGi helps the City of Jena to unify their Task Management Content comming soon by Jürgen Albert [more]

  • Why you should train yourself first with Machine Learning

    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... [more]

  • The native bnd Workspace and Maven

    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... [more]

  • Starting bndrun files using Gradle

    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.<bndrun-file-name>. If you want to start you... [more]

  • OSGi Configuration Admin and Plugin start ordering

    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... [more]

  • Bootstraping OSGi Applications with the Gecko.io Runtime Exporter

    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... [more]

  • Resolution failed. Capabilities satisfying the following requirements could not be found and how to read it!

    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: Resolution failed. Capabilities satisfying the following requirements... [more]

  • A bit of Queuing Theory

    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... [more]

  • How can I trigger an export to a selfexecutable jar with gradle?

    Run ./gradlew export. If the Build was successfull you will find the the result in generated/distribution/<yourBndrunFileName>.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 [more]

  • The Gecko.io Documentation Project

    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.... [more]

  • DIamAnt auf der Medica 2019

    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... [more]

  • Building and deploying SNAPSHOT and RELEASE Versions for maven with BND

    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... [more]

  • Create a “Hello World” Eclipse RAP application with OSGi and Bndtools

    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... [more]

  • Project DIamAnt – Blockchain in der Medizintechnik

    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... [more]

  • From Monolith to Microservice, an appeal to Modularity

    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... [more]

  • WordPress mixed-content warning when changing to HTTPS

    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... [more]

  • A bit of Queuing Theory

    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... [more]

  • WordPress behind HAProxy and Login LockDown plugin

    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... [more]

  • RCP development with bnd

    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... [more]

  • Gecko EMF

    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... [more]

  • Handling SNAPSHOT and RELEASE builds with BND

    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... [more]

  • Rendering Issues with Eclipse Photon on Ubuntu 16.04

    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: SWT_GTK3=0. This is obvious not necessary any more. You... [more]

  • Remote launching OSGi applications with bnd

    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... [more]

  • Automatically create desktop files under Ubuntu with Eclipse Oomph installer

    If you are a user of the Eclipse IDE using Ubuntu and you are using the Oomph installer as well, I will show the possibility to automatically create .desktop files. That makes it possible to find the installation with your desktop search tool. I used it for a while and... [more]

  • HowTo: update of a Mongo 3.2.x standalone to a 3.6.

    Mongo does only support incremental updates. This means, that one can only update from one stable release to the next. The even numbered minor versions are always the stable releases. Getting Started At first you should check if your application is using features of the MongoDB that may have changed... [more]

  • subscribe via RSS