Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teverett/osgi-example
A simple OSGI example
https://github.com/teverett/osgi-example
example felix java osgi
Last synced: 24 days ago
JSON representation
A simple OSGI example
- Host: GitHub
- URL: https://github.com/teverett/osgi-example
- Owner: teverett
- Created: 2013-05-15T20:51:20.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-01-12T03:25:59.000Z (10 months ago)
- Last Synced: 2024-01-12T15:52:32.969Z (10 months ago)
- Topics: example, felix, java, osgi
- Language: Java
- Homepage:
- Size: 119 KB
- Stars: 13
- Watchers: 4
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![CI](https://github.com/teverett/osgi-example/workflows/CI/badge.svg)
osgi-example
============A simple example which publishes an OSGI service
Building & testing
------Simply use maven:
`mvn clean package`
Installing and running in Felix
------Firstly get the Felix framework from [http://felix.apache.org/downloads.cgi](http://felix.apache.org/downloads.cgi)
Secondly extract the Felix runtime and copy the jar file into the `/bundles/` directory.
Finally, run felix
`java -jar bin\felix.jar`
Checking that the bundle is installed
------From the Felix gogo console type `lb`. You should see something like this:
```
____________________________
Welcome to Apache Felix Gogog! lb
START LEVEL 1
ID|State |Level|Name
0|Active | 0|System Bundle (4.2.1)
1|Active | 1|Apache Felix Bundle Repository (1.6.6)
2|Active | 1|Apache Felix Gogo Command (0.12.0)
3|Active | 1|Apache Felix Gogo Runtime (0.10.0)
4|Active | 1|Apache Felix Gogo Shell (0.10.0)
5|Active | 1|khubla.com OSGI example jar (1.0.0.SNAPSHOT)
```To check that the service installed, use the `inspect cap service` command. In thie case our service id is "5" so:
`inspect cap service` shows:
```
g! inspect cap service 5
osgi-example [5] provides:
--------------------------
service; com.khubla.osgiexample.service.HelloService with properties:
Language = English
service.id = 17
```