A blog about my daily tech ramblings.

Showing posts with label Spring OSGi. Show all posts
Showing posts with label Spring OSGi. Show all posts

Friday, 2 August 2013

Injecting OSGi Service Registry in Spring Context

August 02, 2013 Posted by Unknown , , , 1 comment

Introduction

In this example we will inject a OSGi service registry inside a Spring Context.

OSGi Service Registry

Let's assume we got a Oracle datasource in our OSGi container with the following service description. (Please see this link)

Spring Configuration

1. Add the OSGi namespace in your Spring context.


2. Using the osgi:reference to get the datasource object.