how we use osgi to build open liberty · key osgi technologies • equinox (duh) • metatype •...

Post on 19-Mar-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

How we use OSGi to build Open LibertyAlasdair Nottingham - IBM

2

Project goals

• Implement Java EE

• Small Footprint

• Start fast

• Composible

• Dynamic

• Easy to use

3

Fit-for-purpose server• You control which features are loaded into each server instance

Kernel

<feature>servlet-3.1</feature>

servlet-3.1

http-1.1 appmgr

<feature>jsf-2.2</feature>

jsp-2.3 jsf-2.2Java EE

4

Server configuration

<server><featureManager>

<feature>javaee-8.0</feature></featureManager>

<httpEndpoint id=“defaultHttpEndpoint” httpPort=“8080”/>

<webApplication location=“myWeb.war” contextRoot=“/”/></server>

5

Modularity - OSGi vs Java EE

Bundle A

Bundle B Bundle c

ear

jar jar

warjar jar

?

6

Java EE -> OSGi

ear

jar jar

warjar jar war

jar jar

7custom classloaders

Java EE on OSGi

Bundle A

Bundle B Bundle c

ear

jar jar

warjar jar

region

Gateway

8

Key OSGi Technologies

• Equinox (duh)

• Metatype

• Declarative Services

• Config Admin

• Subsystem Features

• Regions

9

Things we learned• Shutdown is not as simple as stopping the framework

• Statics and service do not mix & match

• Use the build tools

• Very powerful for large complex software

• DS and ConfigAdmin together are brilliant

• High learning curve

• Java SE classloading assumptions don’t mix well in OSGi

top related