Home » Tag Archives: OSGi

Tag Archives: OSGi

JBoss Fuse – Some less known trick

osgi-alliance-logo

TL;DR expose java static calls as Karaf shell native commands override OSGi Headers at deploy time override OSGi Headers after deploy time with OSGi Fragments Expose java static calls as Karaf shell native commands As part of my job as software engineer that has to collaborate with support guys and customers, I very often find myself in the need of ...

Read More »

OSGi Service Test Helper: ServiceRegistrationRule

osgi-alliance-logo

OSGi Service Tests can be an efficient means to avoid problems related to dangling service references. As promised in my post about writing simple service contribution verifications, this time I introduce a JUnit rule that assists in testing interactions between components. OSGi Service Tests for Component Interaction Assume we have a service that notifies related observers bound according to the ...

Read More »

OSGi Service Test Helper: ServiceCollector

java-interview-questions-answers

OSGi services come in handy for the development of systems based on loosely coupled components. But loose coupling can make it difficult to recognize problems related to dangling service references. Thus we usually run integrations tests to ensure the availability of service components at runtime. With the intention to reduce boilerplate needed for these kind of tests, I have written ...

Read More »

Apache FOP Integration with Eclipse and OSGi

eclipse-logo

Apache FOP is an open source print processor driven by XSL formatting objects (XSL-FO). It can be quite useful to transform data objects into a PDF for example. However it turned out to be somewhat cumbersome to get it integrated into PDE and finally up and running as OSGi Service. Because of this I provided a P2 repository that contains ...

Read More »

A common CXF Request Interceptor for all OSGi Bundles

java-interview-questions-answers

I have been working on Apache CXF, Karaf, Felix from path few months and i find all these bundled technologies very interesting to work with. While working on some use cases i have been got into a situation where i need only One Interceptor that should be executed on each HTTP request sent to any of bundles deployed under application ...

Read More »

OSGi Testsuite: Introducing Classname Filters

java-interview-questions-answers

OSGi Testsuite is a JUnit test-runner that collects dynamically test classes for execution. It has been published by my fellow Rüdiger about a year ago and proven useful in some projects already. However for gonsole we had to use an ugly patch because version 1.0 only supported .*Test postfix matching for test class names. I solved this problem with version ...

Read More »

OSGi: the gateway into micro-services architecture

java-interview-questions-answers

The terms “modularity” and “microservices architecture” pop up quite often these days in context of building scalable, reliable distributed systems. Java platform itself is known to be weak with regards to modularity (Java 9 is going to address that by delivering project Jigsaw), giving a chance to frameworks like OSGi and JBoss Modules to emerge. When I first heard about ...

Read More »

Configure Your OSGi Services with Apache Felix File Install

apache-felix-logo

A recent post about Managed Services reminded me of a feature in Apache Felix File Install that I found worth mentioning. While working on a project with Holger, I learned from him that File Install cannot only be used to manage bundles. It also monitors configuration files and updates Managed Services when their respective configuration changes. File Install can also ...

Read More »

An Automated OSGi Test Runner

java-interview-questions-answers

Among my fellow team members I was known for notoriously forgetting to maintain the (JUnit) test suite. I just can’t get this extra step of manually adding a test to a suite into my fingers. Fortunately there are continuous integration servers that collect tests by a naming pattern. If one of the orphan tests I introduced fails, it stands out ...

Read More »

How to Create Extensible Java Applications

osgi-alliance-logo

Many applications benefit from being open to extension. This post describes two ways to implement such extensibility in Java. Extensible Applications Extensible applications are applications whose functionality can be extended without having to recompile them and sometimes even without having to restart them. This may happen by simply adding a jar to the classpath, or by a more involved installation ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.