Limbus Engine Implementation

This is the Max5 Limbus Engine implementation that currently provides the following features: - Hot-Deploy features: - Deploy from filesystem - Deploy via Limbus API - Deploy via filesystem observer - Deploy from Maven Repositorx - Undeploy via Limbus API - Plugin lifecycle support - Classloader hierarchy - Isolation of deployed classpaths - Shared classloader for centralized libraries - Maintenance console with linux terminal suppot - Safety shutdown sequence - Classloading leak prevention - Thread stopping and cleaning

License

License

GroupId

GroupId

com.remondis.limbus
ArtifactId

ArtifactId

limbus-engine-impl
Last Version

Last Version

3.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

Limbus Engine Implementation
This is the Max5 Limbus Engine implementation that currently provides the following features: - Hot-Deploy features: - Deploy from filesystem - Deploy via Limbus API - Deploy via filesystem observer - Deploy from Maven Repositorx - Undeploy via Limbus API - Plugin lifecycle support - Classloader hierarchy - Isolation of deployed classpaths - Shared classloader for centralized libraries - Maintenance console with linux terminal suppot - Safety shutdown sequence - Classloading leak prevention - Thread stopping and cleaning

Download limbus-engine-impl

How to add to project

<!-- https://jarcasting.com/artifacts/com.remondis.limbus/limbus-engine-impl/ -->
<dependency>
    <groupId>com.remondis.limbus</groupId>
    <artifactId>limbus-engine-impl</artifactId>
    <version>3.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.remondis.limbus/limbus-engine-impl/
implementation 'com.remondis.limbus:limbus-engine-impl:3.0.1'
// https://jarcasting.com/artifacts/com.remondis.limbus/limbus-engine-impl/
implementation ("com.remondis.limbus:limbus-engine-impl:3.0.1")
'com.remondis.limbus:limbus-engine-impl:jar:3.0.1'
<dependency org="com.remondis.limbus" name="limbus-engine-impl" rev="3.0.1">
  <artifact name="limbus-engine-impl" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.remondis.limbus', module='limbus-engine-impl', version='3.0.1')
)
libraryDependencies += "com.remondis.limbus" % "limbus-engine-impl" % "3.0.1"
[com.remondis.limbus/limbus-engine-impl "3.0.1"]

Dependencies

compile (21)

Group / Artifact Type Version
com.remondis.limbus : limbus-engine-api jar 3.0.1
com.remondis.limbus : limbus-engine-interfaces jar 3.0.1
com.remondis.limbus : limbus-properties jar 3.0.1
com.remondis.limbus : limbus-vfs jar 3.0.1
com.remondis.limbus : limbus-system jar 3.0.1
com.remondis.limbus : limbus-event-multicaster jar 3.0.1
com.remondis.limbus : limbus-task-scheduler jar 3.0.1
com.remondis.limbus : limbus-utils jar 3.0.1
com.remondis.limbus : limbus-launcher jar 3.0.1
com.googlecode.lanterna : lanterna jar 3.1.0-alpha1
org.eclipse.aether : aether-api jar 1.0.2.v20150114
org.eclipse.aether : aether-util jar 1.0.2.v20150114
org.eclipse.aether : aether-impl jar 1.0.2.v20150114
org.eclipse.aether : aether-connector-basic jar 1.0.2.v20150114
org.eclipse.aether : aether-transport-file jar 1.0.2.v20150114
org.eclipse.aether : aether-transport-http jar 1.0.2.v20150114
org.eclipse.aether : aether-transport-wagon jar 1.0.2.v20150114
org.apache.maven.wagon : wagon-ssh jar 1.0
org.apache.maven : maven-settings-builder jar 3.3.3
org.apache.maven : maven-aether-provider jar 3.3.3
org.codehaus.plexus : plexus-utils jar 3.0.24

test (5)

Group / Artifact Type Version
org.slf4j : slf4j-log4j12 jar 2.0.0-alpha1
com.remondis.limbus : limbus-staging jar 3.0.1
junit : junit jar 4.12
org.assertj : assertj-core jar 3.14.0
org.mockito : mockito-core jar 3.1.0

Project Modules

There are no modules declared in this project.

Limbus Engine - A multi classloader hot-deploy container

Table of Contents

  1. Overview
  2. Modules
  3. Compatibility with Java 9 and later

Overview

The Limbus Engine is a hot-deployment runtime container that enables Java applications to load isolated classpaths at runtime. The Limbus Engine is an implementation of a plugin mechanism but even more: The Limbus Engine supports loading and unloading of a classpaths at runtime, sandboxing of the code in a way that loaded code cannot just do everything like System.exit();, flexible routing of plugin output like logging or System.out, a test library that can be used to (un)deploy classpaths in a JUnit tests and features like system monitoring, file-system abstraction and more.

The Limbus Engine uses the same hierarchy of classloaders like the most popular servlet container Apache Tomcat but enables the application to sandbox any code from a classpath. This way the plugin code can be restricted and the rest of the application remains isolated. The Java Security API is used to restrict the code running in a sandbox. A security manager keeps track of what a plugin is doing (read here for more information). The access to a plugin or from a plugin to it's host application is restricted by an interface designed by the host application.

The Limbus Engine provides a framework for developing host applications as well as plugin interfaces and implementations. This is useful for all applications that want to implement a plugin feature.

Modules

The Limbus Engine consists of many different components that are managed as Maven modules. This is an overview of the Limbus modules with a short description of what they are doing:

  • limbus-depchain-host Dependency Chain for developing a host application
  • limbus-depchain-plugin Dependency Chain for developing plugins
  • limbus-engine-api Interfaces and structures for developing plugins as well as the Limbus Engine itself
  • limbus-engine-impl Core-Module providing the Limbus Engine implementation
  • limbus-showcase-plugin Demonstration of a plugin.
  • limbus-showcase-launcher Module for bootstrapping a Limbus Engine to demonstrate the (un)deploy feature using limbus-showcase-plugin.
  • limbus-event-multicaster Core component for multicasting of method calls
  • limbus-jsse System component for initializing the Java Secure Socket Extension
  • limbus-logging-api Interface definitions for system components integrating logging frameworks.
  • limbus-logging-jdk System component integrating the Java Utils Logging Framework
  • limbus-logging-log4j System component integrating Log4J Logging Framework.
  • limbus-properties Core component to access property configurations
  • limbus-utils Util module providing features for accessing ZIP archives and reflective operations.
  • limbus-staging Module for developing integration tests and bootstrapping of an embedded Limbus Engine instance
  • limbus-system Core component managing system componentents as well as an implementation of a Dependency Injection (CDI) mechanism.
  • limbus-task-scheduler System component managing periodically called tasks supporting adaptive scheduling intervals.
  • limbus-vfs System component providing an API for the file system abstraction. Provides an implementation to access the real filesystem and an implementation providing an in-memory file system for easy support of integrations tests

Compatibility with Java 9 and later

Currently the Limbus Engine performs a few class-leak prevention operations like scanning the ThreadLocals that were created but not freed by plugin code. Those operations use reflective access to 'java.base' module. By default this is not allowed in Java 9 and later.

Currently there is no switch to disable this features in Limbus Engine. So currently use the following argument when starting a JVM:

--add-opens java.base/java.lang=com.remondis.limbus.engine.implementation

Leak Prevention notes

Currently ThreadLocal and ClassLoaders are scanned for possible classloader-leaks. Maybe some of those hacks are not necessary.

  • ThreadLocals are held using a WeakReference. Those references should clear themselves if no other stronger reference is existent. Maybe the operation in com.remondis.limbus.engine.LimbusUtil.getCurrentThreadLocals() is not needed anymore.
com.remondis.limbus

REMONDIS IT Services GmbH & Co. KG

Versions

Version
3.0.1
2.0.1