commit | 87f3aff5aeb49ace8fa72245999829643fd4b480 | [log] [tgz] |
---|---|---|
author | Thomas Watson <tjwatson@us.ibm.com> | Thu Sep 10 10:10:22 2020 -0500 |
committer | Thomas Watson <tjwatson@us.ibm.com> | Thu Sep 10 10:16:37 2020 -0500 |
tree | 8e14eded7c35e443676ba531a8ffbecb0a3e6147 | |
parent | 810b56a1b86f112eaabde9d187f5f0ca41e31cb9 [diff] |
FELIX-6327 - NoSuchElementException when services are removed The tryInvokeBind method needs more safeguards around when the reference that just got bound is detected that it got removed. The previous code always assumed there was at least one other viable reference to bind to. That causes the NoSuchElementException when trying to find a fallback reference. Fixing that exposed another issue with the previous code where the state of the DependencyManager is not properly restored in two aspects: 1) Even when unbind is not invoked during tryInvokeBind the currentRefPair would get set to null when it must remain set to the previous value in cases where the invoke bind fails. A check is needed to be sure to only clear the currentRefPair if unbind was successfully invoked. 2) After invoking bind/unbind there is a check to see if the reference is still viable (not deleted). This is where the reported problem occurs when there is no alternative reference available and a NoSuchElementException is thrown. Avoiding the NoSuchElementException and returning from tryInvokeBind would leave the DependencyManager in a state where it thinks there is still a binding thread doing work when that thread is really done. Additional checks are needed to ensure we always restore the binding thread state of the DepenencyManager on exit of tryInvokeBind method.
The Apache Felix project is a collection of semi-related OSGi sub-projects that build and release individually.
The flagship project is the Apache Felix Framework which implements the OSGi Core R7 specification. The /framework
directory contains the source and build tree for the OSGi-compliant framework implementation.
Directly related projects:
/main*
- provides an executable jar that launches the Felix framework.Several sub-projects cover various OSGi Compendium specifications such as:
/configadmin
/configurator
/converter
/coordinator
/deploymentadmin
/deviceaccess
/scr*
/eventadmin
/http
/http
/io
/log*
/metatype
/prefs
/resolver
/upnp
/useradmin
/wireadmin
Several projects provide extra features to an OSGi runtime.
/bundlerepository
- Bundle repository service./connect
- A service registry that enables OSGi style service registry programs without using an OSGi framework./dependencymanager
- A versatile java API, allowing to declaratively register, acquire, and manage dynamic OSGi services./fileinstall*
- A utility to automatically install bundles from a directory./gogo
- A command line shell, runtime and set of base commands for interacting with and introspecting an OSGi framework./healthcheck/*
- An extensible framework to monitor the status of the OSGi container at runtime. (contains systemready)/inventory
- Provides some mechanisms to get the current state of the system and therefore provides an inventory of the system./ipojo
- A service component runtime aiming to simplify OSGi application development./jaas
- Bundle to simplify JAAS usage within OSGi environment./logback
- A simple integration of the OSGi R7 Log (1.4) service to Logback backend./metrics/osgi
- Collecting and publishing metrics related to OSGi applications/rootcause
- Finding the root cause of problems with OSGi declarative services components./utils
- Utility classes for OSGi (intended for embedding within other bundles.)/webconsole*
- Web Based Management Console for OSGi Frameworks.The /tools
directory contains various build tools.
/tools/maven-bundle-plugin
- A maven plugin for building OSGi bundles./tools/osgicheck-maven-plugin
- Maven plugin for checking several OSGi aspects of your project.