OSGi Enterprise

The OSGi Alliance

Release 7

December 2018


Table of Contents

OSGi Specification License, Version 2.0
License Grant
No Warranties and Limitation of Liability
Covenant Not to Assert
General
Trademarks
Feedback
1 Introduction
1.1 Overview of Services
1.2 Application and Provisioning Support
1.3 Reader Level
1.4 Version Information
1.5 References
1.6 Changes
100 Remote Services
100.1 The Fallacies
100.2 Remote Service Properties
100.3 Intents
100.4 General Usage
100.5 Configuration Types
100.6 Security
100.7 References
100.8 Changes
101 Log Service Specification
101.1 Introduction
101.2 The Logger Interface
101.3 Obtaining a Logger
101.4 Logger Configuration
101.5 Log Stream Provider
101.6 Log Reader Service
101.7 Log Entry Interface
101.8 Mapping of Events
101.9 Log Service
101.10 Capabilities
101.11 Security
101.12 org.osgi.service.log
101.13 org.osgi.service.log.admin
101.14 org.osgi.service.log.stream
101.15 References
101.16 Changes
102 Http Service Specification
102.1 Introduction
102.2 Registering Servlets
102.3 Registering Resources
102.4 Mapping HTTP Requests to Servlet and Resource Registrations
102.5 The Default Http Context Object
102.6 Multipurpose Internet Mail Extension (MIME) Types
102.7 Authentication
102.8 Security
102.9 Configuration Properties
102.10 org.osgi.service.http
102.11 References
104 Configuration Admin Service Specification
104.1 Introduction
104.2 Configuration Targets
104.3 The Persistent Identity
104.4 The Configuration Object
104.5 Managed Service
104.6 Managed Service Factory
104.7 Configuration Admin Service
104.8 Configuration Events
104.9 Configuration Plugin
104.10 Meta Typing
104.11 Coordinator Support
104.12 Capabilities
104.13 Security
104.14 org.osgi.service.cm
104.15 org.osgi.service.cm.annotations
104.16 Changes
105 Metatype Service Specification
105.1 Introduction
105.2 Attributes Model
105.3 Object Class Definition
105.4 Attribute Definition
105.5 Meta Type Service
105.6 Meta Type Provider Service
105.7 Using the Meta Type Resources
105.8 Meta Type Resource XML Schema
105.9 Meta Type Annotations
105.10 Limitations
105.11 Related Standards
105.12 Capabilities
105.13 Security Considerations
105.14 org.osgi.service.metatype
105.15 org.osgi.service.metatype.annotations
105.16 References
105.17 Changes
107 User Admin Service Specification
107.1 Introduction
107.2 Authentication
107.3 Authorization
107.4 Repository Maintenance
107.5 User Admin Events
107.6 Security
107.7 Relation to JAAS
107.8 org.osgi.service.useradmin
107.9 References
110 Initial Provisioning Specification
110.1 Introduction
110.2 Procedure
110.3 Special Configurations
110.4 The Provisioning Service
110.5 Management Agent Environment
110.6 Mapping To File Scheme
110.7 Mapping To HTTP(S) Scheme
110.8 Mapping To RSH Scheme
110.9 Exception Handling
110.10 Security
110.11 org.osgi.service.provisioning
110.12 References
112 Declarative Services Specification
112.1 Introduction
112.2 Components
112.3 References to Services
112.4 Component Description
112.5 Component Life Cycle
112.6 Component Properties
112.7 Deployment
112.8 Annotations
112.9 Service Component Runtime
112.10 Security
112.11 Component Description Schema
112.12 org.osgi.service.component
112.13 org.osgi.service.component.annotations
112.14 org.osgi.service.component.runtime
112.15 org.osgi.service.component.runtime.dto
112.16 org.osgi.service.component.propertytypes
112.17 References
112.18 Changes
113 Event Admin Service Specification
113.1 Introduction
113.2 Event Admin Architecture
113.3 The Event
113.4 Event Handler
113.5 Event Publisher
113.6 Specific Events
113.7 Event Admin Service
113.8 Reliability
113.9 Interoperability with Native Applications
113.10 Capabilities
113.11 Security
113.12 org.osgi.service.event
113.13 org.osgi.service.event.annotations
113.14 org.osgi.service.event.propertytypes
113.15 Changes
122 Remote Service Admin Service Specification
122.1 Introduction
122.2 Actors
122.3 Topology Managers
122.4 Endpoint Description
122.5 Remote Service Admin
122.6 Discovery
122.7 Events
122.8 Endpoint Description Extender Format
122.9 Capability Namespaces
122.10 Advice to implementations
122.11 Security
122.12 org.osgi.service.remoteserviceadmin
122.13 org.osgi.service.remoteserviceadmin.namespace
122.14 References
123 JTA Transaction Services Specification
123.1 Introduction
123.2 JTA Overview
123.3 Application
123.4 Resource Managers
123.5 The JTA Provider
123.6 Life Cycle
123.7 Security
123.8 References
124 Management Model Specification for JMX™ Technology
124.1 Introduction
124.2 JMX Overview
124.3 OSGi JMX Management
124.4 MBeans
124.5 Item
124.6 Security
124.7 org.osgi.jmx
124.8 org.osgi.jmx.framework
124.9 org.osgi.jmx.service.cm
124.10 org.osgi.jmx.service.permissionadmin
124.11 org.osgi.jmx.service.provisioning
124.12 org.osgi.jmx.service.useradmin
124.13 org.osgi.jmx.framework.wiring
124.14 References
125 Data Service Specification for JDBC™ Technology
125.1 Introduction
125.2 Database Driver
125.3 Applications
125.4 Security
125.5 org.osgi.service.jdbc
125.6 References
126 JNDI Services Specification
126.1 Introduction
126.2 JNDI Overview
126.3 JNDI Context Manager Service
126.4 JNDI Provider Admin service
126.5 JNDI Providers
126.6 OSGi URL Scheme
126.7 Traditional Client Model
126.8 Security
126.9 org.osgi.service.jndi
126.10 References
127 JPA Service Specification
127.1 Introduction
127.2 JPA Overview
127.3 Bundles with Persistence
127.4 Extending a Persistence Bundle
127.5 JPA Provider
127.6 Static Access
127.7 Capabilities
127.8 Security
127.9 org.osgi.service.jpa
127.10 org.osgi.service.jpa.annotations
127.11 References
127.12 Changes
128 Web Applications Specification
128.1 Introduction
128.2 Web Container
128.3 Web Application Bundle
128.4 Web URL Handler
128.5 Events
128.6 Interacting with the OSGi Environment
128.7 Security
128.8 References
130 Coordinator Service Specification
130.1 Introduction
130.2 Usage
130.3 Coordinator Service
130.4 Security
130.5 org.osgi.service.coordinator
132 Repository Service Specification
132.1 Introduction
132.2 Using a Repository
132.3 Repository
132.4 osgi.content Namespace
132.5 XML Repository Format
132.6 XML Repository Schema
132.7 Capabilities
132.8 Security
132.9 org.osgi.service.repository
132.10 References
132.11 Changes
133 Service Loader Mediator Specification
133.1 Introduction
133.2 Java Service Loader API
133.3 Consumers
133.4 Service Provider Bundles
133.5 Service Loader Mediator
133.6 osgi.serviceloader Namespace
133.7 Use of the osgi.extender Namespace
133.8 Security
133.9 org.osgi.service.serviceloader
133.10 References
134 Subsystem Service Specification
134.1 Introduction
134.2 Subsystems
134.3 Subsystem Region
134.4 Subsystem Relationships
134.5 Determining Content
134.6 Determining Dependencies
134.7 Accepting Dependencies
134.8 Sharing Capabilities
134.9 Region Context Bundle
134.10 Explicit and Implicit Resources
134.11 Resource References
134.12 Starting and Stopping Resources
134.13 Subsystem Service
134.14 Subsystem Life Cycle
134.15 Pre-Calculated Deployment
134.16 Subsystem Types
134.17 Weaving Hooks
134.18 Stopping and Uninstalling Subsystems Implementation
134.19 Capabilities
134.20 Security
134.21 org.osgi.service.subsystem
134.22 References
135 Common Namespaces Specification
135.1 Introduction
135.2 osgi.extender Namespace
135.3 osgi.contract Namespace
135.4 osgi.service Namespace
135.5 osgi.implementation Namespace
135.6 osgi.unresolvable Namespace
135.7 org.osgi.namespace.contract
135.8 org.osgi.namespace.extender
135.9 org.osgi.namespace.service
135.10 org.osgi.namespace.implementation
135.11 org.osgi.namespace.unresolvable
135.12 References
135.13 Changes
137 REST Management Service Specification
137.1 Introduction
137.2 Interacting with the REST Management Service
137.3 Resources
137.4 Representations
137.5 Clients
137.6 Extending the REST Management Service
137.7 XML Schema
137.8 Capabilities
137.9 Security
137.10 org.osgi.service.rest
137.11 org.osgi.service.rest.client
137.12 JavaScript Client API
137.13 References
138 Asynchronous Service Specification
138.1 Introduction
138.2 Usage
138.3 Async Service
138.4 The Async Mediator
138.5 Fire and Forget Invocations
138.6 Delegating to Asynchronous Implementations
138.7 Capabilities
138.8 Security
138.9 org.osgi.service.async
138.10 org.osgi.service.async.delegate
140 Http Whiteboard Specification
140.1 Introduction
140.2 The Servlet Context
140.3 Common Whiteboard Properties
140.4 Registering Servlets
140.5 Registering Servlet Filters
140.6 Registering Resources
140.7 Registering Listeners
140.8 Life Cycle
140.9 The Http Service Runtime Service
140.10 Integration with Http Service Contexts
140.11 Configuration Properties
140.12 Capabilities
140.13 Security
140.14 org.osgi.service.http.context
140.15 org.osgi.service.http.runtime
140.16 org.osgi.service.http.runtime.dto
140.17 org.osgi.service.http.whiteboard
140.18 org.osgi.service.http.whiteboard.annotations
140.19 org.osgi.service.http.whiteboard.propertytypes
140.20 References
140.21 Changes
147 Transaction Control Service Specification
147.1 Introduction
147.2 Usage
147.3 Transaction Control Service
147.4 The TransactionContext
147.5 Resource Providers
147.6 Transaction Recovery
147.7 Capabilities
147.8 Security
147.9 org.osgi.service.transaction.control
147.10 org.osgi.service.transaction.control.jdbc
147.11 org.osgi.service.transaction.control.jpa
147.12 org.osgi.service.transaction.control.recovery
148 Cluster Information Specification
148.1 Introduction
148.2 OSGi frameworks in a cluster
148.3 Node Status Service
148.4 Framework Node Status Service
148.5 Application-specific Node Status metadata
148.6 Security
148.7 org.osgi.service.clusterinfo
148.8 org.osgi.service.clusterinfo.dto
150 Configurator Specification
150.1 Introduction
150.2 Entities
150.3 Configuration Resources
150.4 Bundle Configuration Resources
150.5 Initial Configurations
150.6 Life Cycle
150.7 Grouping and Coordinations
150.8 Security
150.9 Capabilities
150.10 osgi.configuration Namespace
150.11 Configuration Resources in a Repository
150.12 org.osgi.service.configurator
150.13 org.osgi.service.configurator.annotations
150.14 org.osgi.service.configurator.namespace
150.15 References
151 JAX-RS Whiteboard Specification
151.1 Introduction
151.2 The JAX-RS Whiteboard
151.3 Common Whiteboard Properties
151.4 Registering JAX-RS Resources
151.5 Registering JAX-RS Extensions
151.6 Registering JAX-RS Applications
151.7 Advertising JAX-RS Endpoints
151.8 Whiteboard Error Handling
151.9 The JAX-RS Client API
151.10 Portability and Interoperability
151.11 Capabilities
151.12 Security
151.13 org.osgi.service.jaxrs.client
151.14 org.osgi.service.jaxrs.runtime
151.15 org.osgi.service.jaxrs.runtime.dto
151.16 org.osgi.service.jaxrs.whiteboard
151.17 org.osgi.service.jaxrs.whiteboard.annotations
151.18 org.osgi.service.jaxrs.whiteboard.propertytypes
151.19 References
152 CDI Integration Specification
152.1 Introduction
152.2 Components
152.3 Component Scope
152.4 Container Component
152.5 Standard Definitions
152.6 Single Component
152.7 Factory Component
152.8 Component Properties
152.9 Bean Property Types
152.10 Providing Services
152.11 Component Property Injection Points
152.12 Reference Injection Points
152.13 Interacting with Service Events
152.14 CDI Component Runtime
152.15 Capabilities
152.16 Relationship to CDI features
152.17 Security
152.18 org.osgi.service.cdi
152.19 org.osgi.service.cdi.annotations
152.20 org.osgi.service.cdi.propertytypes
152.21 org.osgi.service.cdi.reference
152.22 org.osgi.service.cdi.runtime
152.23 org.osgi.service.cdi.runtime.dto
152.24 org.osgi.service.cdi.runtime.dto.template
152.25 References
702 XML Parser Service Specification
702.1 Introduction
702.2 JAXP
702.3 XML Parser service
702.4 Properties
702.5 Getting a Parser Factory
702.6 Adapting a JAXP Parser to OSGi
702.7 Usage of JAXP
702.8 Security
702.9 org.osgi.util.xml
702.10 References
705 Promises Specification
705.1 Introduction
705.2 Promise
705.3 Deferred
705.4 Callbacks
705.5 Chaining Promises
705.6 Monad
705.7 Timing
705.8 Functional Interfaces
705.9 Utility Methods
705.10 Security
705.11 org.osgi.util.promise
705.12 org.osgi.util.function
705.13 References
705.14 Changes
706 Push Stream Specification
706.1 Introduction
706.2 Asynchronous Event Streams
706.3 The Push Stream
706.4 The Push Stream Provider
706.5 Simple Push Event Sources
706.6 Security
706.7 org.osgi.util.pushstream
706.8 References
707 Converter Specification
707.1 Introduction
707.2 Entities
707.3 Standard Converter
707.4 Conversions
707.5 Repeated or Deferred Conversions
707.6 Customizing converters
707.7 Conversion failures
707.8 Security
707.9 org.osgi.util.converter
707.10 References

List of Figures

100.1 Architecture
100.2 Distribution Service Properties
100.3 Relation between imported and exported configuration types
101.1 Logger Class Diagram org.osgi.service.log package
101.2 Log Admin Class Diagram org.osgi.service.log.admin package
101.3 Log Stream Diagram org.osgi.service.log.stream package
102.1 Http Service Overview Diagram
104.1 Configuration Admin Service Overview
104.2 Overall Service Diagram
104.3 Differentiation of ManagedService and ManagedServiceFactory Classes
104.4 Managed Service Configuration Action Diagram
104.5 PIDs and External Associations
104.6 Managed Service Factory Action Diagram
104.7 Managed Service Factory Example
104.8 Order of Configuration Plugin Services
105.1 Class Diagram Meta Type Service, org.osgi.service.metatype
105.2 Sources for Meta Types
105.3 XML Schema Instance Structure (Type name = Element name)
107.1 User Admin Service, org.osgi.service.useradmin
110.1 Initial Provisioning
110.2 Flow chart installation Management Agent bundle
110.3 Action Diagram for RSH
112.1 Service Component Runtime, org.osgi.service.component package
112.2 Immediate Component Configuration
112.3 Delayed Component Configuration
112.4 Factory Component
112.5 Sequence Diagram for binding
112.6 Service Component Runtime DTOs
113.1 The Event Admin service org.osgi.service.event package
113.2 Channel Pattern
122.1 Remote Service Admin Entities
122.2 Roles
122.3 Fail Over Scenario in a cluster
122.4 Examples
122.5 Endpoint Discovery Architecture. T=Topology Manager, D=Discovery
122.6 Endpoint Description XML Structure
123.1 Transaction Service Specification Entities
123.2 Data Source Proxy
124.1 MBeans
124.2 JMX Architecture
125.1 JDBC Class/Service Overview
126.1 JNDI Service Specification Service Entities
126.2 Backing Context
127.1 JPA Service overview
127.2 JPA Client View
127.3 JPA Configuration
127.4 JPA Dynamic Model
128.1 Web Container Entities
128.2 State diagram Web Application
128.3 Web URL Handler
130.1 Class and Service overview
130.2 Action Diagram Implicit Coordination
130.3 Flow through the Coordination template
130.4 Coordination state diagram
132.1 Class and Service overview
132.2 XML Structure
133.1 Entities
133.2 Cardinality Service Type
134.1 Entities org.osgi.service.subsystem
134.2 Regions and Import/Export
134.3 Regions and Sharing Capabilities
134.4 Parent Child Relationship
134.5 Subsystem resources
134.6 Subsystems
134.7 Parent Child Relationship with Unscoped Subsystems
134.8 Subsystems and cycles
134.9 Scoped Subsystems and cycles
134.10 Provision Policy
134.11 Provision Policy
134.12 Subsystems and acceptDependencies
134.13 Sharing Capabilities
134.14 Preferred Provider
134.15 Explicit Resource Example
134.16 Subsystems and Resources
134.17 Subsystems and Resources
134.18 Subsystems and Resources
134.19 Subsystems and Resources
134.20 Root, attached to Scoped Subsystems S1, S2
134.21 Complex example Subsystem scoping
134.22 State diagram Subsystems
138.1 Class and Service overview
140.1 Http Whiteboard Overview Diagram
140.2 Servlet Context entities and their relation
140.3 Runtime DTO Overview Diagram
140.4 Request Info DTO Overview Diagram
147.1 Class and Service overview
148.1 Clusterinfo Entity overview
148.2 Example cluster deployment
150.1 Configurator Entity Overview
151.1 JAX-RS Whiteboard Overview Diagram
152.1 CCR Model
152.2 CDI Scope Model
152.3 CDI Component Runtime DTOs
702.1 XML Parsing diagram
705.1 Class diagram of org.osgi.util.promise
707.1 Converter Entity overview

List of Tables

1.1 Packages and versions
100.1 Remote Service Properties registered by the Distribution Provider
100.2 Remote Service Properties registered by Exporting bundles
100.3 Synonyms and Alternatives in Exported Configurations
101.1 Log Levels
101.2 Mapping of Bundle Events to Log Entries
101.3 Mapping of Service Events to Log Entries
101.4 Mapping of Framework Event to Log Entries
101.5 Event Topics
102.1 Examples of Name-space Mapping
102.2 Sample Extension to MIME Media Mapping
104.1 Schemes for Device-Oriented PID Names
104.2 service.cmRanking Usage For Ordering
105.1 XML Schema for Meta Type resources
107.1 Example Groups with Basic and Required Members
107.2 Example Action Groups with their Basic and Required Members
110.1 Content types of provisioning ZIP file
110.2 RSH Header description
112.1 Action taken for policy-option when a new or higher ranking service becomes available
112.2 Component Element and Annotations
112.3 Implementation Element and Annotations
112.4 Property Element and Annotations
112.5 Properties Element and Annotations
112.6 Service Element and Annotations
112.7 Provide Element and Annotations
112.8 Reference Element and Annotations
112.9 Factory Property Element and Annotations
112.10 Factory Properties Element and Annotations
112.11 Component Property Name Mapping Examples
112.12 Single-Element Annotation Mapping Examples for value Method
112.13 Coercion From Property Value to Method Type
113.1 General property names for events
122.1 Endpoint Properties
122.2 Property Attributes
122.3 osgi.remoteserviceadmin.discovery Namespace
122.4 osgi.remoteserviceadmin.distribution Namespace
122.5 osgi.remoteserviceadmin.topology Namespace
122.6 Endpoint Permission Actions
124.1 MBeans
128.1 Dependency versions
128.2 Servlet Context Service Properties
128.3 Web bundle URL Parameters
130.1 States and transitions
132.1 Repository Service Properties
132.2 osgi.content definition
132.3 repository element attributes
132.4 referral element attributes
132.5 capability element attributes
132.6 requirement element attributes
132.7 attribute element attributes
132.8 directive element attributes
133.1 osgi.serviceloader namespace definition
134.1 Subsystem Mandatory Service Properties
134.2 Subsystem States
134.3 Actions
135.1 osgi.extender Namespace
135.2 osgi.contract Namespace
135.3 osgi.service Namespace
135.4 osgi.implementation Namespace
140.1 Service registration properties for ServletContextHelper services.
140.2 Behavior of ServletContext methods.
140.3 Common properties
140.4 Service properties for Servlet Whiteboard services.
140.5 Service properties for Filter Whiteboard services.
140.6 Service properties for Preprocessor Whiteboard services.
140.7 Service properties for resource services.
140.8 Service properties for listener services.
140.9 Service properties for the HttpServiceRuntime service
147.1 Methods for executing scoped work
147.2 Transaction Status Values
147.3 Lifecycle rules for Local Transactions
147.4 Pooling configuration properties
148.1 Service properties of the NodeStatus service
148.2 Additional service properties of the FrameworkNodeStatus service
150.1 Resource-level Configurator Keys
150.2 PID-level Configurator Keys
150.3 JSON Conversions
150.4 Applying Configurations: Overwrite Policies
150.5 Removing externally modified configurations
150.6 osgi.configuration namespace definition
151.1 Service properties for the JaxrsServiceRuntime service
151.2 Common properties
151.3 Service properties for JAX-RS Whiteboard resource services.
151.4 Service properties for JAX-RS Whiteboard extension services.
151.5 Service properties for JAX-RS Whiteboard application services.
151.6 Service properties for JAX-RS Whiteboard application services.
152.1 Component Context Events
152.2 Bean Property Type Name Mapping Examples
152.3 Single-Element Annotation Mapping Examples for value Method
152.4 Coercion From Property Value to Method Type
152.5 @Service applied to Producers
152.6 Reference injection point types
152.7 Portable Extension Service Properties
152.8 Bean Manager Service Properties
702.1 JAXP 1.1 minimum package versions
706.1 Stateless Intermediate Operations on the Push Stream
706.2 Stateful Intermediate Operations on the Push Stream
706.3 Non Short Circuiting Terminal Operations on the Push Stream
706.4 Short Circuiting Terminal Operations on the Push Stream
707.1 Scalar types that support direct conversions
707.2 Special cases converting to scalars from String
707.3 Converting to Enum types
707.4 Collection / Array target creation
707.5 Component Property Name Mapping Examples
707.6 Single-Element Annotation Mapping Examples for value Method
707.7 Map target creation