This videos shows how to build a simple User Registration and Authorization application and discusses different combinations of OSGi and Java EE development and deployment in GlassFish. The first step is to to deploy a simple OSGi service and client in GlassFish. Then the OSGi client is replaced by a Web Application Bundle which uses @OSGiService for dynamic discovery, bind, inject, and track the OSGi service. Then the service bundle is replaced by a JavaEE application using EJB and JPA.
More information: https://blogs.oracle.com/arungupta/entry/eclipse_con_2011_hands_on