OSGi and Apache Felix

Started working on OSGi and Apache Felix. Looks interesting.

Start with http://www.osgi.org
Certified Products: http://www.osgi.org/Specifications/Certified. These are the only products we need to use.
Download OSGi Specification from http://www.osgi.org/Download/Release4V41

I started with Apache Felix. Because of Apache.

http://felix.apache.org/site/apache-felix-application-demonstration.html
http://felix.apache.org/site/integrating-felix-with-eclipse.html
http://felix.apache.org/site/presentations.html

Felix Sub Projects: http://felix.apache.org/site/subprojects.html

This give more information and understanding of OSGi Concepts
http://felix.apache.org/site/apache-felix-osgi-tutorial.html

Starting Felix
installation directory>java -jar bin/felix.jar

ps –> Shows process in memory

Read documentation at felix-1.8.0doc

*****—–*****—–*****—–*****—–*****
Working with default bundles.

org.osgi.framework.BundleException: Unresolved constraint in bundle 5: package; (&(package=org.osgi.service.cm)(version>=1.2.0))
This problem comes when we dont install OSGI bundles first.

-> requires 5
org.apache.felix.http.jetty [5] requires:
-----------------------------------------
Nothing

This is wrong. It needs OSGi bundles.

There is a order to install bundles given on this page http://felix.apache.org/site/downloads.cgi

*****—–*****—–*****—–*****—–*****

Setup Web Console for Apache Felix

This is important to understand and appreciate management console

Step 1: Install following bundles and start them


felix-1.8.0>java -jar bin/felix.jar

Welcome to Felix.
=================

-> install file:c:downloadapache_felixorg.osgi.compendium-1.2.0.jar
install file:c:downloadapache_felixorg.osgi.core-1.2.0.jar
install file:c:downloadapache_felixorg.osgi.foundation-1.2.0.jar
install file:c:downloadapache_felixorg.osgi.service.obr-1.0.2.jar

install file:c:downloadapache_felixorg.apache.felix.log-1.0.0.jar
install file:c:downloadapache_felixorg.apache.felix.http.jetty-1.0.0.jar
Bundle ID: 4
-> Bundle ID: 5
-> Bundle ID: 6
-> Bundle ID: 7
-> -> Bundle ID: 8
-> Bundle ID: 9
-> install file:c:downloadapache_felixorg.apache.felix.webconsole-1.2.10.jar
Bundle ID: 10
->
-> ps
START LEVEL 1
 ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.8.0)
[   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
[   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
[   3] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
[   4] [Installed  ] [    1] OSGi R4 Compendium Bundle (4.1.0)
[   5] [Installed  ] [    1] OSGi R4 Core Bundle (4.1)
[   6] [Installed  ] [    1] file:c:downloadapache_felixorg.osgi.foundation-1.2.0.jar
[   7] [Installed  ] [    1] OSGi OBR Service API (1)
[   8] [Installed  ] [    1] Apache Felix Log Service (1.0.0)
[   9] [Installed  ] [    1] HTTP Service (1.0.0)
[  10] [Installed  ] [    1] Apache Felix Web Management Console (1.2.10)
-> start 4 5 6 7 8 9 10
->

Step 2:  Check port where web console is listening. This information is available at

felix-1.8.0conf

Step 3:  http://localhost:8080/system/console/bundles open in browser

Default user id password: admin/admin

Apache Felix Screen
Apache Felix Screen

Right Click on Image and view to see full image

*****—–*****—–*****—–*****—–*****

-o-

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s