● The feature/component concept in the WSO2 Carbon
● Installing features using the Feature Manager.
● How to create your custom products for cluster wide
● Scripting feature installations for automation.
● Configuring logs/adding configs/etc.
What is Carbon
Carbon is a modular server runtime based on OSGi
Built on top of Carbon are a set of middleware
servers (App Server, ESB, Identity, API Manager, etc)
» Install new features, uninstall, revert
Carbon includes a set of re-usable core components
● Clustering, User Management, Logging, JMX, ...
WSO2 Carbon based Products
• Service Management Feature
• Proxy Services Features
• Transport Management Feature, etc..
What is a Feature
In Eclipse world
– Feature is a grouping of set of logically related plug-ins/ OSGi bundles
– Feature can be installed into Eclipse platform using its Update Manager
In Carbon world
– Feature can be thought of as an installable form of one or more logically
related Carbon component
• Service Management Component
– What you develop
• Service Management Feature
– What you install
– Feature is a grouping of one or more logically related Carbon components
– Features can be installed into Carbon based product using Feature Manager
Allows you to specify pre-requisites of your Carbon
– Other dependent features, bundles.
– Dependency Management.
• Are installable Units which can be installed into any
Carbon based product.
• Can be installed using the WSO2 Carbon Feature
Manager or by using a script
• Can be shared with others by packaging features as a
Repository (Update Site in eclipse terms).
What is a Carbon Component
● A set of OSGi Bundles.
● Lives in the Carbon Framework. Hence should conform to rules define
in the Carbon Framework.
● Uses Core Carbon Services
○ Via OSGI service registry
e.g. Registry Service, UserManager Service, etc
● Two aspects/ BE-FE Separation
○ Every component has a core runtime, a clean SOA management interface, a
well-defined front-end console component
○ Back-end Runtime
○ Front-end Console
● A provision platform for OSGi based systems.
● p2 stands for “Provisioning Platform”
● Provides a well defined model for provisioning OSGi
● p2 allows us to manage components in a controlled
● Install, Uninstall, Revert
● Based on a web or file based repository
○ Can be hosted internally for an organization
● Three approaches:
○ Command line
○ Web console
○ Secure remote API
Carbon Component: Development
1. Develop the Carbon component
○ Back-end component (BE OSGi bundles)
○ Front-end component (FE OSGi bundles)
○ Common bundles, if any
2. Develop the corresponding feature
○ BE/Server Feature
○ FE/UI Feature
○ Composite Feature
3. Install into a Carbon based product
○ By integrating with the product build system
○ By developing a feature repository and installing using Feature
● Manages the packaging of OSGi bundles
● Supports deploying, undeploying,
● Advanced features include shared
Student Manager Component
Lets develop a sample Carbon component to understand
the development process as well as the build process.
• Student Manager component
○ Consists of a BE runtime which exposes a Web services to
• Add new students
• Get the list of students
○ Consist of a FE console which displays the available student
information on the Carbon management console.
• Student Manager Feature
Developing the BE Component
● Some actual server logic plus an admin
service to manage it
● Add some special sauce into the services.
xml to let us know it’s an admin service
● component.xml configures permissions
We use Maven as our build tool.
• Building Carbon components/OSGi bundles
– Use Maven Bundle plugin to build OSGi bundles
• Building Features
– Use Maven P2 Feature plugin (Developed at WSO2)
– Use p2-feature-gen goal
• Building a Repository
– Use Maven P2 plugin
– P2-repo-generator goal
Carbon Component: Build Process
Engage with WSO2
Helping you get the most out of your deployments
From project evaluation and inception to development and
going into production, WSO2 is your partner in ensuring
100% project success