Snippets
Snippets are examples of OSGi code that you can copy and paste or just use to learn. All snippets are based on the bnd tool but are easily ported to other environments. All code in the snippets section is placed in the public domain, you can freely copy it and do whatever you want with it; there is no requirement to retain copyright texts.
All snippets are tested in an Eclipse IDE with the FileInstall management agent. You need to setup eclipse if you want to try them out in an easy way.
- Troubleshooting
- Track a Set of Service with Components
- Track a Set of Service
- A Bundle That Stops Itself
- SetupFelix
- SetupEclipse
- Register a Service with a Component
- Register a Servlet with the Http Service
- Register a Log Service with a Bundle Activator
- Hello World as Declarative Service Component
- Hello World (and Goodbye)
- Get a Service (classic and component)
- Get Configuration Data with a Managed Service
- Extender Pattern with Automatic Servlet Registration
- Use of the OSGi Bundle-ClassPath with Beanshell
If you have interesting snippets, do not hesitate to send them.



