JBoss OSGi comes with a number of examples that you can build and deploy. Each example deployment is verified by an accompanying test case
blueprint - Basic Blueprint Container examples
configadmin - Configuration Admin example
ds - Declarative Services examples
eventadmin - Event Admin examples
http - HttpService examples
interceptor - Examples that intercept and process bundle metadata
jbossas - Integration examples with non OSGi components (i.e. EJB3, Servlet)
jmx - Standard and extended JMX examples
jndi - Bind objects to the Naming Service
jta - Transaction examples
simple - Simple OSGi examples (start here)
webapp - WebApplication (WAR) examples
xml parser - SAX/DOM parser examples
For more information on these examples, see the Chapter 6, Provided Examples section.