SlideShare a Scribd company logo
Bundle deployment at state
machine level
Aleš Justin
JBoss, a division of Red Hat
ales.justin@jboss.org
2
• How we started?
• Replacement for JMX based Kernel
• Dependency State Machine
• POJO Component Model
• Where are we now?
• Aspectized Deployers
• Classloader Model
• OSGi Integration
• VFS
• MBeans Support
• AOP Integration
• Management Model
• Spring Integration
JBoss Microcontainer
3
• Controller
• Dependency State Machine
• ControllerStates – define your own states
• Install context receive callbacks when dependencies satisfied
• ControllerContext
• Represents a component
• Has dependencies
• Receives callbacks to implement the model when dependencies are
satisifed for a state transition
• ControllerMode – automatic, manual, on demand
• DependencyInfo and DependencyItem
• Define your own dependencies
• Write your own dependency item
• Standard implementations available
4
The basic API
public interface Controller {
install(ControllerContext c);
uninstall(Object name);
}
public interface ControllerContext {
Object getName();
DependencyInfo getDependencyInfo();
void install(ControllerState s);
void uninstall(ControllerState s);
}
public interface DependencyInfo {
boolean resolveDependencies(Controller c, ControllerState s);
}
public interface DependencyItem{
ControllerState getWhenRequired();
boolean isResolved();
}
5
• Exisiting implementations
• POJO – KernelControllerContext
• IOC component model
• JMX - ServiceControllerContext
• Legacy JBoss service model
• Example transitions – implemented by ControllerContexts
• Instantiate
• POJO – new POJO();
• JMX – registerMBean();
• Configure
• POJO – pojo.setProperty(value);
• JMX – mbeanServer.setAttribute(objectName, property, value);
• Start lifecycle callback
• POJO – pojo.start();
• JMX – mbeanServer.invoke(objectName, “start”, null, null);
6
• Structural Deployers
• VFS usage
• Recognise deployment types
• User defined – META-INF/jboss-structure.xml
• Specification defined – jar, war, ear, etc.
• Defines the structure
• Where is the metadata? META-INF or WEB-INF, etc.
• Where are the classes? / or WEB-INF/classes, etc.
• What are the subdeployments?
• Aspectized Deployers
• Each Deployer does one thing well
• Easy to control how much gets done
• Off-line tool like the admin console only wants to do parsing
• Runtime does everything
• Easy to swap out behaviour – e.g. change the classloader
Deployer Integration
7
• Deployers are Staged
• Deployments are processed width first
• Aspects
• Parsing Deployers
• Turns xml into a metadata model attachment
• e.g. my-beans.xml -> KernelDeployment
• ClassLoading Deployers
• Creates classloaders from metadata
• e.g. Uses the information from the StructureDeployers
• Component Deployers
• Splits complicated deployments into units
• e.g. KernelDeployment -> BeanMetaDatas
• Real Deployers
• Does the real work of deployment
• e.g. BeanMetaData -> controller.install()
8
• Deployment Attachments
• Each deployment has attachments
• e.g. deployment.getAttachment(KernelDeployment.class)
• Two types of attachment
• Predetermined – overridden by the user, e.g. Profile service
• Transient – parsed by the parsing Deployer
• Predetermined overrides transient
• Attachments are not used linearly
• Example JCA RAR deployment
• Parsing done by RAR Deployer – creates RARMetaData
• RAR Component Deployer creates ServiceMetaData
• No real RAR Deployer, it uses the JMX real Deployer
• Alternate Real Deployers Strategy
• Doesn't have to use a Microcontainer recognised component model
• e.g. Log4j real Deployer could do META-INF/log4j.xml -> log4j config
directly
9
• Simplifying SPI
• Hidden Base
• Loader interface
• ClassLoaderPolicy
• ParentPolicy
• Goals
• Simple OSGi implementation
• Backward compatible
• Clean extension
Classloader Model Rewrite
10
• New ControllerContexts
• Introduction of Dependency to Deployers
• OSGi Services Support
• New Deployers
• OSGi Manifest.MF MetaData
• DeploymentResolver
• OSGi Classloader
• Other features
• OSGi Core API as Façade
• Declarative Services Support
• OBR usage
OSGi Integration

More Related Content

PPT
Git preso to valtech cfml team
PDF
PPTX
Road Trip To Component
PPTX
ColdFusion Fw1 (FrameWork1) introduction
PPTX
Maven
PPTX
Java in the cloud with Jelastic
PDF
Introduction to Role Based Administration in WildFly 8
PDF
WildFly & WildFly Swarm
Git preso to valtech cfml team
Road Trip To Component
ColdFusion Fw1 (FrameWork1) introduction
Maven
Java in the cloud with Jelastic
Introduction to Role Based Administration in WildFly 8
WildFly & WildFly Swarm

What's hot (19)

PPTX
Mule properties
PPT
Developing Rest services with SailsJs by Andrey Kolodnitskiy
PDF
Turn you Java EE Monoliths into Microservices with WildFly Swarm
PPT
Mule compatible technologies
PPTX
Junit in mule demo
PPTX
Mule system properties
PPTX
Mule quartz hari_gatadi
PDF
Puppet Camp London 2014: MCollective as an Integration Layer
PDF
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
PDF
What's New in WildFly 9?
PPTX
Building and Managing Projects with Maven
PDF
An Introduction to Membase
PDF
MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)
ODP
Fluxxor react library
PDF
WildFly AppServer - State of the Union
PDF
PostgreSQL News
PPTX
Vm component in mule
PPTX
Mule java part-1
DOCX
Instruction on creating a cluster on jboss eap environment
Mule properties
Developing Rest services with SailsJs by Andrey Kolodnitskiy
Turn you Java EE Monoliths into Microservices with WildFly Swarm
Mule compatible technologies
Junit in mule demo
Mule system properties
Mule quartz hari_gatadi
Puppet Camp London 2014: MCollective as an Integration Layer
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
What's New in WildFly 9?
Building and Managing Projects with Maven
An Introduction to Membase
MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)
Fluxxor react library
WildFly AppServer - State of the Union
PostgreSQL News
Vm component in mule
Mule java part-1
Instruction on creating a cluster on jboss eap environment
Ad

Viewers also liked (20)

PDF
The Role of the OSGi Gateway in GST Security Objectives and Architecture - An...
PDF
What's new in the OSGi Enterprise Release 5.0 - David Bosschaert and Tim Diek...
PDF
A TSP Perspective on OSGi - A Lunggren
PDF
Creating Enterprise Services for the Siemens OpenSOA Product Line - Manfred H...
PDF
OSGi and Next Generation Trains - Jens Haeger, Deutsche Bahn
PDF
Issues in Designing Push Based Mobile Application Platform - Rafiul Ahad, Oracle
PDF
Developments in Asia - D Inglin
PDF
Examining Gatespace / Ericssonʼs Telematics Solutions - C Larsson
PDF
Cisco Application eXtension Platform (AXP) - James Weathersby, Cisco
PDF
History and Future of the Downloadable Mobile Marketplace - Jon Bostrom, Nokia
PDF
Town Hall - Business Implications of Open Source OSGi Implementations - BJ Ha...
PDF
Business plan Metavector - B Mariman
PDF
An OSGi Environment for FlexibleService Concepts - Detlef Kuck, Teamleader Te...
PDF
OSGi Users’ Forum Japan - Ryutaru Kawamura, Senior Manager, NTT
PDF
Moving from Applications to Business Processes - M Herterich
PDF
OSGi Service Platform and the Mobile Ecosystem - John R. Barr, Ph.D., Chair O...
PPT
Sql Server 2008 R2 Ctp Install
PDF
Reviving the HTTP Service - Felix Meschberger
PDF
OSGi Alliance and its Technology - Where Are We Now, and What is Your Vision ...
PDF
The AMIC Host and Vehicle Services Api's - E Nelson
The Role of the OSGi Gateway in GST Security Objectives and Architecture - An...
What's new in the OSGi Enterprise Release 5.0 - David Bosschaert and Tim Diek...
A TSP Perspective on OSGi - A Lunggren
Creating Enterprise Services for the Siemens OpenSOA Product Line - Manfred H...
OSGi and Next Generation Trains - Jens Haeger, Deutsche Bahn
Issues in Designing Push Based Mobile Application Platform - Rafiul Ahad, Oracle
Developments in Asia - D Inglin
Examining Gatespace / Ericssonʼs Telematics Solutions - C Larsson
Cisco Application eXtension Platform (AXP) - James Weathersby, Cisco
History and Future of the Downloadable Mobile Marketplace - Jon Bostrom, Nokia
Town Hall - Business Implications of Open Source OSGi Implementations - BJ Ha...
Business plan Metavector - B Mariman
An OSGi Environment for FlexibleService Concepts - Detlef Kuck, Teamleader Te...
OSGi Users’ Forum Japan - Ryutaru Kawamura, Senior Manager, NTT
Moving from Applications to Business Processes - M Herterich
OSGi Service Platform and the Mobile Ecosystem - John R. Barr, Ph.D., Chair O...
Sql Server 2008 R2 Ctp Install
Reviving the HTTP Service - Felix Meschberger
OSGi Alliance and its Technology - Where Are We Now, and What is Your Vision ...
The AMIC Host and Vehicle Services Api's - E Nelson
Ad

Similar to Bundle deployment at state machine level - Ales Justin, JBoss (20)

PPTX
DevOps with Elastic Beanstalk - TCCC-2014
PDF
Elements for an iOS Backend
PPTX
React.js - The Dawn of Virtual DOM
PPTX
MVC + ORM (with project implementation)
PPTX
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
PPTX
Migration Station at SAS - DevOps for Fusion with Version Control and Continu...
PPT
Spring - a framework written by developers
PPT
Web Sphere Administration guide – Packaging and Deploying Jee Applications
PPT
Weblogicserveroverviewtopologyconfigurationadministration 1227546826890714-9
PPT
Weblogicserveroverviewtopologyconfigurationadministration 1227546826890714-9
PPTX
Introduction to Spring
PDF
Hosting Ruby Web Apps
PDF
Overview of Java EE 6 by Roberto Chinnici at SFJUG
PDF
Drupal 8 - Quick bites
PDF
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
PPTX
Weblogic 101 for dba
PPTX
Enhanced Workflows in Cascade Server by Leah Einecker
PPTX
PDF
JBoss EAP / WildFly, State of the Union
PPTX
How kubernetes operators can rescue dev secops in midst of a pandemic updated
DevOps with Elastic Beanstalk - TCCC-2014
Elements for an iOS Backend
React.js - The Dawn of Virtual DOM
MVC + ORM (with project implementation)
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Migration Station at SAS - DevOps for Fusion with Version Control and Continu...
Spring - a framework written by developers
Web Sphere Administration guide – Packaging and Deploying Jee Applications
Weblogicserveroverviewtopologyconfigurationadministration 1227546826890714-9
Weblogicserveroverviewtopologyconfigurationadministration 1227546826890714-9
Introduction to Spring
Hosting Ruby Web Apps
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Drupal 8 - Quick bites
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Weblogic 101 for dba
Enhanced Workflows in Cascade Server by Leah Einecker
JBoss EAP / WildFly, State of the Union
How kubernetes operators can rescue dev secops in midst of a pandemic updated

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
Network Security Unit 5.pdf for BCA BBA.
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Electronic commerce courselecture one. Pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
KodekX | Application Modernization Development
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Spectroscopy.pptx food analysis technology
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Unlocking AI with Model Context Protocol (MCP)
Network Security Unit 5.pdf for BCA BBA.
The AUB Centre for AI in Media Proposal.docx
Chapter 3 Spatial Domain Image Processing.pdf
Programs and apps: productivity, graphics, security and other tools
Electronic commerce courselecture one. Pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
MYSQL Presentation for SQL database connectivity
Dropbox Q2 2025 Financial Results & Investor Presentation
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Understanding_Digital_Forensics_Presentation.pptx
KodekX | Application Modernization Development
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectroscopy.pptx food analysis technology
sap open course for s4hana steps from ECC to s4
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Unlocking AI with Model Context Protocol (MCP)

Bundle deployment at state machine level - Ales Justin, JBoss

  • 1. Bundle deployment at state machine level Aleš Justin JBoss, a division of Red Hat ales.justin@jboss.org
  • 2. 2 • How we started? • Replacement for JMX based Kernel • Dependency State Machine • POJO Component Model • Where are we now? • Aspectized Deployers • Classloader Model • OSGi Integration • VFS • MBeans Support • AOP Integration • Management Model • Spring Integration JBoss Microcontainer
  • 3. 3 • Controller • Dependency State Machine • ControllerStates – define your own states • Install context receive callbacks when dependencies satisfied • ControllerContext • Represents a component • Has dependencies • Receives callbacks to implement the model when dependencies are satisifed for a state transition • ControllerMode – automatic, manual, on demand • DependencyInfo and DependencyItem • Define your own dependencies • Write your own dependency item • Standard implementations available
  • 4. 4 The basic API public interface Controller { install(ControllerContext c); uninstall(Object name); } public interface ControllerContext { Object getName(); DependencyInfo getDependencyInfo(); void install(ControllerState s); void uninstall(ControllerState s); } public interface DependencyInfo { boolean resolveDependencies(Controller c, ControllerState s); } public interface DependencyItem{ ControllerState getWhenRequired(); boolean isResolved(); }
  • 5. 5 • Exisiting implementations • POJO – KernelControllerContext • IOC component model • JMX - ServiceControllerContext • Legacy JBoss service model • Example transitions – implemented by ControllerContexts • Instantiate • POJO – new POJO(); • JMX – registerMBean(); • Configure • POJO – pojo.setProperty(value); • JMX – mbeanServer.setAttribute(objectName, property, value); • Start lifecycle callback • POJO – pojo.start(); • JMX – mbeanServer.invoke(objectName, “start”, null, null);
  • 6. 6 • Structural Deployers • VFS usage • Recognise deployment types • User defined – META-INF/jboss-structure.xml • Specification defined – jar, war, ear, etc. • Defines the structure • Where is the metadata? META-INF or WEB-INF, etc. • Where are the classes? / or WEB-INF/classes, etc. • What are the subdeployments? • Aspectized Deployers • Each Deployer does one thing well • Easy to control how much gets done • Off-line tool like the admin console only wants to do parsing • Runtime does everything • Easy to swap out behaviour – e.g. change the classloader Deployer Integration
  • 7. 7 • Deployers are Staged • Deployments are processed width first • Aspects • Parsing Deployers • Turns xml into a metadata model attachment • e.g. my-beans.xml -> KernelDeployment • ClassLoading Deployers • Creates classloaders from metadata • e.g. Uses the information from the StructureDeployers • Component Deployers • Splits complicated deployments into units • e.g. KernelDeployment -> BeanMetaDatas • Real Deployers • Does the real work of deployment • e.g. BeanMetaData -> controller.install()
  • 8. 8 • Deployment Attachments • Each deployment has attachments • e.g. deployment.getAttachment(KernelDeployment.class) • Two types of attachment • Predetermined – overridden by the user, e.g. Profile service • Transient – parsed by the parsing Deployer • Predetermined overrides transient • Attachments are not used linearly • Example JCA RAR deployment • Parsing done by RAR Deployer – creates RARMetaData • RAR Component Deployer creates ServiceMetaData • No real RAR Deployer, it uses the JMX real Deployer • Alternate Real Deployers Strategy • Doesn't have to use a Microcontainer recognised component model • e.g. Log4j real Deployer could do META-INF/log4j.xml -> log4j config directly
  • 9. 9 • Simplifying SPI • Hidden Base • Loader interface • ClassLoaderPolicy • ParentPolicy • Goals • Simple OSGi implementation • Backward compatible • Clean extension Classloader Model Rewrite
  • 10. 10 • New ControllerContexts • Introduction of Dependency to Deployers • OSGi Services Support • New Deployers • OSGi Manifest.MF MetaData • DeploymentResolver • OSGi Classloader • Other features • OSGi Core API as Façade • Declarative Services Support • OBR usage OSGi Integration