SlideShare a Scribd company logo
© 2017 IBM Corporation
EclipseCon Europe 2017
Eclipse MicroProfile Config and
OSGi Config Admin
Emily Jiang – MicroProfile Development Lead
@emilyfhjiang
1
© 2017 IBM Corporation
 What are Microservices?
– Small concise service – small piece of SOA
– Easy to maintain
– Easy to release
– Loosely coupled a number of them to form a system
 Microservice best practice
– Configurable
– Fault tolerance
– Monitoring
– Secure
– Working well in the cloud
 How to build it the right way?
– Use Eclipse MicroProfile
2 CDI 1.2
© 2017 IBM Corporation
What is Eclipse MicroProfile?
Eclipse MicroProfile is an open-source community specification for Cloud Native Java
microservices
A community of individuals, organizations, and vendors collaborating within an open
source (Eclipse) project to bring microservices to the Enterprise Java community
3
© 2017 IBM Corporation
Community - individuals, organizations, vendors
And Growing ...
4
© 2017 IBM Corporation
 Why Eclipse MicroProfile?
– Microservice portable among application servers
– No vendor locking unlike Spring
– Fast innovating
– Frequent release cycle
5 CDI 1.2
© 2017 IBM Corporation
Accelerating Adoption of Microservices
6
Time
8 ?
MicroProfile 1.0
CDI 1.2
JAX-RS 2.0
JSON-P 1.0
MicroProfile 1.2MicroProfile 1.1
MicroProfile 1.0
MP Config 1.0 MicroProfile 2.0 MicroProfile 2.1 MicroProfile 2.2
MicroProfile 1.3 MicroProfile 1.x
© 2017 IBM Corporation7
MicroProfile 1.0 (Fall 2016)
jaxrs-2.0
cdi-1.2
jsonp-1.0
MicroProfile 1.1 (August
2017)
microProfile-1.0
mpConfig-1.0 MicroProfile 1.2 (Sept 2017)
microProfile-1.1
mpConfig-1.1
mpFaultTolerance-1.0
mpHealth-1.0
mpMetrics-1.0
mpJwt-1.0
MicroProfile 1.3 (???)
MicroProfile 1.2
mpTracing-1.0
mpOpenApi-1.0
MicroProfile 2.0 (1Q 2018?)
MicroProfile 1.3
jaxrs-2.1 // Java EE 8
cdi-2.0 // Java EE 8
jsonp-1.1 // Java EE 8
jsonb-1.0 // Java EE 8
2017
2018
Aug Sept
© 2017 IBM Corporation
Eclipse MicroProfile 1.2 (Sep, 2017)
8
MicroProfile 1.2
= Updated
= No change from last release
JAX-RS 2.0JSON-P 1.0CDI 1.2
Config 1.1
Fault
Tolerance
1.0
JWT
Propagation
1.0
Health
Check 1.0
Metrics 1.0
= New
© 2017 IBM Corporation
http://microprofile.io/
MicroProfile adds new enterprise Java capabilities for microservices
Config Fault Tolerance Health Check Health Metrics JWT
externalize
configuration to
improve portability
build robust behavior
to cope with
unexpected failures
ensure services are
running
understand the
interactions between
services while running
resolve problems in
complex distributed
systems
New in Eclipse MicroProfile Release 1.2: https://projects.eclipse.org/projects/technology.microprofile/releases/1.2
Robust Microservices
© 2017 IBM Corporation
MicroProfile Config 1.1
 Why?
– Configure Microservice without repacking the application
 How?
– Properties from the built-in configure sources with default config ordinals:
• META-INFmicroprofile-config.properties (default ordinal = 100)
• System properties (default ordinal = 400)
• Environment variables (default ordinal = 300)
– Provide custom configure sources with a priority
– Provide custom converters with a priority
– Access properties
10
© 2017 IBM Corporation
Provide a config source
 Step 1: Create a class that implements org.eclipse.microprofile.config.spi.ConfigSource
 Step 2: Register the class using service loader pattern
– Create a file under META-INFserviceorg.eclipse.microprofile.config.spi.ConfigSource
– Inside the file: put the fully qualified config source implementation class name
 Step 2: Alternatively, directly call SPI to add a config source to a builder and then build a
config
– ConfigProviderResolver.getBuilder() .withSources(ConfigSource…
configSources).build()
11
© 2017 IBM Corporation
Provide a Converter
 The config properties are all specified in strings in config sources.
 In order to get a ultimate value other than the built-in types, a converter is needed.
 Step 1: Create a class that implements org.eclipse.microprofile.config.spi.Converter
 Step 2: Register the class using service loader pattern.
– Create a file under META-INFserviceorg.eclipse.microprofile.config.spi.Converter
– Inside the file: put the fully qualified config converter implementation class name
 Step 2: alternatively, directly call SPI to add a config source to a builder and then build a config
– ConfigProviderResolver.getBuilder() .withConfigSources(…).withConverters(Converter… converter).build()
12
public interface Converter<T> {
/**
* Configure the string value to a specified type
* @param value the string representation of a property value.
* @return the converted value or null
*
* @throws IllegalArgumentException if the value cannot be converted to the
specified type.
*/
T convert(String value);
}
© 2017 IBM Corporation
Look up properties
– Access configuration via
• Programmatically lookup
Config config = ConfigProvider.getConfig();
config.getValue(“myProp”, String.class);
• Via CDI Injection
@Inject @ConfigProperty(name="my.string.property") String myPropV;
13
© 2017 IBM Corporation
MicroProfile Config
 Static Config
 Dynamic Config
@Inject
@ConfigProperty(name="myStaticProp"
)
private String staticProp;
@Inject
@ConfigProperty(name="myDynamicProp
")
private Provider<String>
dynamicProp;
microprofile-config.properties
myStaticProp=defaultSValue
myDynamicProp=defaultDValue
Java Options
-DmyStaticProp=customSValue
-DmyDynamicProp=customDValue
overrides
© 2017 IBM Corporation
 OSGi r7 has Config Admin
Config Admin
PID Configuration
com.acme Name=Bob
Age= 18
12.1 Name = Andy
Age = 22
pid=com.acme
© 2017 IBM Corporation
Why bother to support MicroProfile Config in OSGi?
o Future aspiration goal
• Application using CDI, JAX-RS can run unchanged in OSGi, MicroProfile 1.0
• Applications using MicroProfile programming model including Config can run
unchanged in OSGi
© 2017 IBM Corporation
 How to support MicroProfile Config in OSGi?
o MP Config Implementation bundle registers the ConfigProvider service
o MP Config Implementation bundle registers CDI extension to register Config bean, a
producer to produce config properties with the qualifier ConfigProperty
o Depend on CDI in OSGi specification
app bundle MP Config
Impl
ConfigProvider
CDI beans
© 2017 IBM Corporation
 Create an ecosystem with MicroProfile Config and Config Admin
o Config Admin offer maps containing properties
o Config Admin can be treated as a config source in MicroProfile Config with the
specified the config_ordinal (a normal key value, 500 if not exists).
© 2017 IBM Corporation
 OSGi r7 supports Converters
o Not quite the same as the MicroProfile Config Conveter
o Use converter adapter to convert OSGi converters to be used as MicroProfile
converters
o Call into OSGi converter service to do the conversion
© 2017 IBM Corporation20
 Resources
– http://microprofile.io/
– https://openliberty.io/
– https://www.eclipse.org/community/eclipse_newsletter/2017/september/
© 2017 IBM Corporation
Thank you
Special Thanks to BJ Hargrave for your contributions
towards the integration part!

More Related Content

PDF
CDI and OSGi so happy together! - R Auge
PDF
Journey from Monolith to a Modularized Application - Approach and Key Learnin...
PDF
Fantastic Java contracts - and where to define them
PDF
Container Native Development Tools - Talk by Mickey Boxell
PDF
Building and Deploying Cloud Native Applications
PDF
Make Spring Home (Spring Customization and Extensibility)
PDF
Not Just Initializing
PDF
Accelerate Spring Apps to Cloud at Scale
CDI and OSGi so happy together! - R Auge
Journey from Monolith to a Modularized Application - Approach and Key Learnin...
Fantastic Java contracts - and where to define them
Container Native Development Tools - Talk by Mickey Boxell
Building and Deploying Cloud Native Applications
Make Spring Home (Spring Customization and Extensibility)
Not Just Initializing
Accelerate Spring Apps to Cloud at Scale

What's hot (20)

PDF
Running Kubernetes Workloads on Oracle Cloud Infrastructure
PDF
The Path Towards Spring Boot Native Applications
PDF
Spring Boot Observability
PPTX
What's new in Spring Boot 2.0
PDF
K8s at Scale in the Enterprise: Self-Service Through the View of Personas
PPTX
Infrastructure less development with Azure Service Fabric
PPTX
DevNetCreate Workshop - build a react app - React crash course
PDF
PKS is Not JAK8sP (Just Another Kubernetes Platform)
PDF
PKS: The What and How of Enterprise-Grade Kubernetes
PDF
Spring: Your Next Java Micro-Framework
PDF
Going Serverless Using the Spring Framework Ecosystem
PDF
Building Cloud Native Applications with Oracle Autonomous Database.
PPTX
Oracle Cloud With Azure DevOps Pipelines
PDF
Observability Enhancements in Steeltoe
PPTX
More Devs, No Problems: Enabling Self-Service Access to Kubernetes
PDF
DevSecOps with Confidence
PDF
Functions: Implement Once, Execute Anywhere!
PDF
Spring Tools 4: Bootiful Spring Tooling for the Masses
PPTX
Dev ops
PPTX
PKS Networking with NSX-T: You Focus on your App, We'll Take Care of the Rest!
Running Kubernetes Workloads on Oracle Cloud Infrastructure
The Path Towards Spring Boot Native Applications
Spring Boot Observability
What's new in Spring Boot 2.0
K8s at Scale in the Enterprise: Self-Service Through the View of Personas
Infrastructure less development with Azure Service Fabric
DevNetCreate Workshop - build a react app - React crash course
PKS is Not JAK8sP (Just Another Kubernetes Platform)
PKS: The What and How of Enterprise-Grade Kubernetes
Spring: Your Next Java Micro-Framework
Going Serverless Using the Spring Framework Ecosystem
Building Cloud Native Applications with Oracle Autonomous Database.
Oracle Cloud With Azure DevOps Pipelines
Observability Enhancements in Steeltoe
More Devs, No Problems: Enabling Self-Service Access to Kubernetes
DevSecOps with Confidence
Functions: Implement Once, Execute Anywhere!
Spring Tools 4: Bootiful Spring Tooling for the Masses
Dev ops
PKS Networking with NSX-T: You Focus on your App, We'll Take Care of the Rest!
Ad

Similar to Eclipse microprofile config and OSGi config admin - E Jiang (20)

PPTX
Build12 factorappusingmp
PPTX
Building 12-factor Cloud Native Microservices
PDF
Live Coding 12 Factor App
PPTX
Microservices made easy JavaCro 2021
PPTX
Building microservice for api with helidon and cicd pipeline
PPTX
Micro profile and istio
PPTX
Building cloud native microservices
KEY
A Walking Tour of (almost) all of Springdom
PPTX
Cloud native programming model comparison
PPTX
The new and smart way to build microservices - Eclipse MicroProfile
PPTX
Yuriy Chapran - Building microservices.
PDF
All things open 2019 crazy-sm-ecosystem
PDF
The Crazy Service Mesh Ecosystem
PDF
Deliver Performant & Highly Available User Session Stores for Cloud-Native Apps
PDF
Dependency Injection Styles
PPTX
Connect JavaEE to the cloud with JCA by Steve Millidge
PPTX
Cloud nativemicroservices jax-london2020
PPTX
Cloud nativemicroservices jax-london2020
PDF
GR8Conf 2011: Grails, how to plug in
PPT
Developing and Deploying Microservices to IBM Cloud Private
Build12 factorappusingmp
Building 12-factor Cloud Native Microservices
Live Coding 12 Factor App
Microservices made easy JavaCro 2021
Building microservice for api with helidon and cicd pipeline
Micro profile and istio
Building cloud native microservices
A Walking Tour of (almost) all of Springdom
Cloud native programming model comparison
The new and smart way to build microservices - Eclipse MicroProfile
Yuriy Chapran - Building microservices.
All things open 2019 crazy-sm-ecosystem
The Crazy Service Mesh Ecosystem
Deliver Performant & Highly Available User Session Stores for Cloud-Native Apps
Dependency Injection Styles
Connect JavaEE to the cloud with JCA by Steve Millidge
Cloud nativemicroservices jax-london2020
Cloud nativemicroservices jax-london2020
GR8Conf 2011: Grails, how to plug in
Developing and Deploying Microservices to IBM Cloud Private
Ad

More from mfrancis (20)

PDF
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
PDF
OSGi and Java 9+ - BJ Hargrave (IBM)
PDF
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
PDF
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
PDF
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
PDF
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
PDF
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
PDF
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
PDF
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
PDF
OSGi CDI Integration Specification - Ray Augé (Liferay)
PDF
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
PDF
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
PDF
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
PDF
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
PDF
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
PDF
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
PDF
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
PDF
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
PDF
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
PDF
How to connect your OSGi application - Dirk Fauth (Bosch)
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
OSGi and Java 9+ - BJ Hargrave (IBM)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
OSGi CDI Integration Specification - Ray Augé (Liferay)
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
How to connect your OSGi application - Dirk Fauth (Bosch)

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Approach and Philosophy of On baking technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
KodekX | Application Modernization Development
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Big Data Technologies - Introduction.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Cloud computing and distributed systems.
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Machine learning based COVID-19 study performance prediction
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
Encapsulation theory and applications.pdf
cuic standard and advanced reporting.pdf
Approach and Philosophy of On baking technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
20250228 LYD VKU AI Blended-Learning.pptx
KodekX | Application Modernization Development
NewMind AI Weekly Chronicles - August'25 Week I
Big Data Technologies - Introduction.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Network Security Unit 5.pdf for BCA BBA.
Encapsulation_ Review paper, used for researhc scholars
Reach Out and Touch Someone: Haptics and Empathic Computing
Cloud computing and distributed systems.
Chapter 3 Spatial Domain Image Processing.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
MIND Revenue Release Quarter 2 2025 Press Release
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Machine learning based COVID-19 study performance prediction
Dropbox Q2 2025 Financial Results & Investor Presentation

Eclipse microprofile config and OSGi config admin - E Jiang

  • 1. © 2017 IBM Corporation EclipseCon Europe 2017 Eclipse MicroProfile Config and OSGi Config Admin Emily Jiang – MicroProfile Development Lead @emilyfhjiang 1
  • 2. © 2017 IBM Corporation  What are Microservices? – Small concise service – small piece of SOA – Easy to maintain – Easy to release – Loosely coupled a number of them to form a system  Microservice best practice – Configurable – Fault tolerance – Monitoring – Secure – Working well in the cloud  How to build it the right way? – Use Eclipse MicroProfile 2 CDI 1.2
  • 3. © 2017 IBM Corporation What is Eclipse MicroProfile? Eclipse MicroProfile is an open-source community specification for Cloud Native Java microservices A community of individuals, organizations, and vendors collaborating within an open source (Eclipse) project to bring microservices to the Enterprise Java community 3
  • 4. © 2017 IBM Corporation Community - individuals, organizations, vendors And Growing ... 4
  • 5. © 2017 IBM Corporation  Why Eclipse MicroProfile? – Microservice portable among application servers – No vendor locking unlike Spring – Fast innovating – Frequent release cycle 5 CDI 1.2
  • 6. © 2017 IBM Corporation Accelerating Adoption of Microservices 6 Time 8 ? MicroProfile 1.0 CDI 1.2 JAX-RS 2.0 JSON-P 1.0 MicroProfile 1.2MicroProfile 1.1 MicroProfile 1.0 MP Config 1.0 MicroProfile 2.0 MicroProfile 2.1 MicroProfile 2.2 MicroProfile 1.3 MicroProfile 1.x
  • 7. © 2017 IBM Corporation7 MicroProfile 1.0 (Fall 2016) jaxrs-2.0 cdi-1.2 jsonp-1.0 MicroProfile 1.1 (August 2017) microProfile-1.0 mpConfig-1.0 MicroProfile 1.2 (Sept 2017) microProfile-1.1 mpConfig-1.1 mpFaultTolerance-1.0 mpHealth-1.0 mpMetrics-1.0 mpJwt-1.0 MicroProfile 1.3 (???) MicroProfile 1.2 mpTracing-1.0 mpOpenApi-1.0 MicroProfile 2.0 (1Q 2018?) MicroProfile 1.3 jaxrs-2.1 // Java EE 8 cdi-2.0 // Java EE 8 jsonp-1.1 // Java EE 8 jsonb-1.0 // Java EE 8 2017 2018 Aug Sept
  • 8. © 2017 IBM Corporation Eclipse MicroProfile 1.2 (Sep, 2017) 8 MicroProfile 1.2 = Updated = No change from last release JAX-RS 2.0JSON-P 1.0CDI 1.2 Config 1.1 Fault Tolerance 1.0 JWT Propagation 1.0 Health Check 1.0 Metrics 1.0 = New
  • 9. © 2017 IBM Corporation http://microprofile.io/ MicroProfile adds new enterprise Java capabilities for microservices Config Fault Tolerance Health Check Health Metrics JWT externalize configuration to improve portability build robust behavior to cope with unexpected failures ensure services are running understand the interactions between services while running resolve problems in complex distributed systems New in Eclipse MicroProfile Release 1.2: https://projects.eclipse.org/projects/technology.microprofile/releases/1.2 Robust Microservices
  • 10. © 2017 IBM Corporation MicroProfile Config 1.1  Why? – Configure Microservice without repacking the application  How? – Properties from the built-in configure sources with default config ordinals: • META-INFmicroprofile-config.properties (default ordinal = 100) • System properties (default ordinal = 400) • Environment variables (default ordinal = 300) – Provide custom configure sources with a priority – Provide custom converters with a priority – Access properties 10
  • 11. © 2017 IBM Corporation Provide a config source  Step 1: Create a class that implements org.eclipse.microprofile.config.spi.ConfigSource  Step 2: Register the class using service loader pattern – Create a file under META-INFserviceorg.eclipse.microprofile.config.spi.ConfigSource – Inside the file: put the fully qualified config source implementation class name  Step 2: Alternatively, directly call SPI to add a config source to a builder and then build a config – ConfigProviderResolver.getBuilder() .withSources(ConfigSource… configSources).build() 11
  • 12. © 2017 IBM Corporation Provide a Converter  The config properties are all specified in strings in config sources.  In order to get a ultimate value other than the built-in types, a converter is needed.  Step 1: Create a class that implements org.eclipse.microprofile.config.spi.Converter  Step 2: Register the class using service loader pattern. – Create a file under META-INFserviceorg.eclipse.microprofile.config.spi.Converter – Inside the file: put the fully qualified config converter implementation class name  Step 2: alternatively, directly call SPI to add a config source to a builder and then build a config – ConfigProviderResolver.getBuilder() .withConfigSources(…).withConverters(Converter… converter).build() 12 public interface Converter<T> { /** * Configure the string value to a specified type * @param value the string representation of a property value. * @return the converted value or null * * @throws IllegalArgumentException if the value cannot be converted to the specified type. */ T convert(String value); }
  • 13. © 2017 IBM Corporation Look up properties – Access configuration via • Programmatically lookup Config config = ConfigProvider.getConfig(); config.getValue(“myProp”, String.class); • Via CDI Injection @Inject @ConfigProperty(name="my.string.property") String myPropV; 13
  • 14. © 2017 IBM Corporation MicroProfile Config  Static Config  Dynamic Config @Inject @ConfigProperty(name="myStaticProp" ) private String staticProp; @Inject @ConfigProperty(name="myDynamicProp ") private Provider<String> dynamicProp; microprofile-config.properties myStaticProp=defaultSValue myDynamicProp=defaultDValue Java Options -DmyStaticProp=customSValue -DmyDynamicProp=customDValue overrides
  • 15. © 2017 IBM Corporation  OSGi r7 has Config Admin Config Admin PID Configuration com.acme Name=Bob Age= 18 12.1 Name = Andy Age = 22 pid=com.acme
  • 16. © 2017 IBM Corporation Why bother to support MicroProfile Config in OSGi? o Future aspiration goal • Application using CDI, JAX-RS can run unchanged in OSGi, MicroProfile 1.0 • Applications using MicroProfile programming model including Config can run unchanged in OSGi
  • 17. © 2017 IBM Corporation  How to support MicroProfile Config in OSGi? o MP Config Implementation bundle registers the ConfigProvider service o MP Config Implementation bundle registers CDI extension to register Config bean, a producer to produce config properties with the qualifier ConfigProperty o Depend on CDI in OSGi specification app bundle MP Config Impl ConfigProvider CDI beans
  • 18. © 2017 IBM Corporation  Create an ecosystem with MicroProfile Config and Config Admin o Config Admin offer maps containing properties o Config Admin can be treated as a config source in MicroProfile Config with the specified the config_ordinal (a normal key value, 500 if not exists).
  • 19. © 2017 IBM Corporation  OSGi r7 supports Converters o Not quite the same as the MicroProfile Config Conveter o Use converter adapter to convert OSGi converters to be used as MicroProfile converters o Call into OSGi converter service to do the conversion
  • 20. © 2017 IBM Corporation20  Resources – http://microprofile.io/ – https://openliberty.io/ – https://www.eclipse.org/community/eclipse_newsletter/2017/september/
  • 21. © 2017 IBM Corporation Thank you Special Thanks to BJ Hargrave for your contributions towards the integration part!