Examples

You are looking for some examples to learn how to implement bundle for Apache Karaf ? There is some usefull examples include in the source code, you can also browse and view documentation on the github of the projet.
If you are looking for examples that are missing here or you want to share your example with the community, please contact us on the mailing list and we will add it with pleasure.

Name Description Github
Blueprint using services with XML or annotations.
Branding branding the look'n feel of the shell console for your own Karaf distribution.
Bundle the bundle is the core deployment unit when using OSGi.
Shell Command creating a shell command.
Deployer creating a Karaf deployer service on the deploy folder.
Dump creating a dump provider service.
Integration test creating integration tests in addition of unit tests for your bundles.
JDBC using simple JDBC implementation with Pax-JDBC and an Apache Derby embedded database.
JPA using JPA with entity manager for the persistence implementation.
Pax Logging Appender registering a custom Pax Logging appender.
Maven using the Karaf Maven plugin with goals like assembly, client, deploy, kar, run...
MBean registering a JMX MBean in the Apache Karaf MBeanServer
Profile creating several profiles (in a registry) and use these profiles to create custom distributions.
REST using JAX-RS to implement a REST service.
Scheduler creating a runnable service periodically executed by the Apache Karaf scheduler.
Service Component Runtime using services with annotations with the OSGi compendium specification.
Servlet registering a servlet in the Karaf HTTP Service with different approaches.
SOAP using JAX-WS to implement a SOAP service.
URL Namespace Handler creating a new URL namespace handler and use it in all Apache Karaf parts.
War creating a regular war to be deployed in Apache Karaf.

Security Advisories

CVE-2016-8750 : Apache Karaf's LDAPLoginModule is vulnerable to LDAP injection.

Notes »

CVE-2018-11786 : Enforce SSH permission based on RBAC.

Notes »

CVE-2018-11787 : Unsecure access to Gogo shell in the webconsole.

Notes »

Articles

New Karaf HTTP proxy feature
Building Angular WebBundle for Apache Karaf
Monitoring Apache Cassandra with Apache Karaf Decanter
What's new in Apache Karaf Cellar 4.0.0 ?
Creating a plugin system with Karaf and OSGi MicroServices
Monitoring and alerting with Apache Karaf Decanter
Apache Karaf Christmas gifts: docker.io, profiles, and decanter
Encrypt ConfigAdmin properties values in Apache Karaf
MDC logging with Apache Karaf and Camel
JavaMagazin Articles (in German)
Apache Syncope backend with Apache Karaf
Apache Karaf, Camel, ActiveMQ with Falcon for Hadoop CDC solution
Apache Karaf, Cellar, Camel, ActiveMQ monitoring with ELK (ElasticSearch, Logstash, and Kibana)
Coming in Karaf 3.0.0: new enterprise JPA (OpenJPA, Hibernate) and CDI (OpenWebBeans, JBoss Weld) features
Coming in Karaf 3.0.0: new enterprise JDBC feature
Coming in Karaf 3.0.0: new enterprise JNDI feature
Coming in Karaf 3.0.0: RBAC support for OSGi services and console commands
Coming in Karaf 3.0.0: subshell and completion mode
Coming in Karaf 3.0.0: JAAS users, groups, roles, and ACLs
Karaf and Pax Web: disabling reverse lookup
Pax Logging: loggers log level
Apache Hadoop and Karaf, Article 1: Karaf as HDFS client
Bind certain Web-Applications to specific HttpConnectors II
Bind certain Web-Applications to specific HttpConnectors
Integration in the cloude with Apache Karaf, Cellar and Camel
Load balancing with Apache Karaf Cellar, and mod_proxy_balancer
Multiple HTTP connectors in Karaf
Communication between two remote Camel routes with Karaf Cellar
xmppgtalk shell connector for Karaf and Gogo shell
Create custom log4j appender for Karaf and Pax Logging
How to enable HTTPs certificate client auth with Karaf
Declarative Services with Karaf (SCR)
Apache Karaf 2011 Millesime
Coming in Karaf 3.0: new KAR service, command, and management
Overview on Apache Karaf, Pax Web, and Camel archetypes
Do you know Apache Karaf Maven plugins ?
Apache Karaf moved to OSGi r4.3
Use Camel, CXF, and Karaf to implement batches
JAX-RS services using CXF and Karaf
What's new in Apache Karaf 2.2.4 ?
Adding custom log-appender to Pax Logging
Adding additional ServletContext to Pax Web
One Year of Apache Karaf
Apache Karaf Child Instances, what are they, and why should I use them ?
From Eclipse Tycho to Apache Karaf: the easy way!
http://developer.eclipsesource.com/slides/deploy-and-manage-rap-applications/#/6