Time for action - installing the Pax Web bundles

Let's prepare the framework by uninstalling the previous Http Service implementation and installing those bundles listed previously.

Uninstall previous http support

We will install the Pax Web bundles on start level 4, which contains frontend support functionality.

Let's start by dropping to start level 3 (for Tier 1 Service Providers maintenance) and uninstalling the previously used http implementation bundles:

g! frameworklevel 3
g! lb
START LEVEL 3
ID|State |Level|Name
0|Active | 0|System Bundle (3.0.1)
1|Active | 1|Apache Felix Bundle Repository (1.6.2)
2|Active | 1|Apache Felix Gogo Command (0.6.0)
3|Active | 1|Apache Felix Gogo Runtime (0.6.0)
4|Active | 1|Apache Felix Gogo Shell (0.6.0)
5|Active | 2|Bookshelf Inventory API (1.5.0)
6|Active | 1|Apache Felix iPOJO (1.6.4)
7|Active | 2|Bookshelf Inventory Impl - Mock (1.9.0)
8|Active | 1|Bookshelf Log Helper API (1.10.0)
9|Active | 1|Apache Felix Log Service (1.0.0)
10|Active | 1|Bookshelf Log Helper Impl (1.10.0)
11|Active | 3|Bookshelf Service (1.10.0)
12|Resolved | 5|Apache Felix iPOJO Gogo Command (1.0.0)
13|Resolved | 5|Bookshelf Service Gogo commands (1.10.0)
14|Resolved | 4|Apache Felix Http Jetty (2.0.4)
15|Resolved | 4|Apache Felix Http Whiteboard (2.0.4)
16|Resolved | 5|Bookshelf Servlet (1.11.0)
17|Active | 1|Apache Commons IO Bundle (1.4.0)
18|Active | 1|Apache Commons FileUpload Bundle (1.2.1)
19|Active | 1|JSON (20090211.0.0)
20|Resolved | 5|Apache Felix Web Management Console (3.1.2)

21|Resolved | 5|Apache Felix iPOJO WebConsole Plugins (1.4.4)

The bundles we want to uninstall are Apache Felix Http Jetty and Apache Felix Http Whiteboard. We'll also uninstall the BookshelfServlet bundle, as it will no longer be needed.

g! uninstall 14 15 16

Install PAX Web bundles

We will install the Pax Web bundles directly from the links provided on the project download page (http://wiki.ops4j.org/display/paxweb/Download).

The Pax Web main bundle, with Jetty embedded:

g! bundlelevel -i 4
g!
g! ops4j = http://repo2.maven.org/maven2/org/ops4j/pax/web/
g!

g! start $ops4j/pax-web-jetty-bundle/0.7.3/pax-web-jetty-bundle-0.7.3.jar

The web extender bundle:


g! start $ops4j/pax-web-extender-war/0.7.3/pax-web-extender-war-0.7.3.jar

And the JSP support Pax Web extension:

g! start $ops4j/pax-web-jsp/0.7.3/pax-web-jsp-0.7.3.jar

Double-check the http service implementation

To make sure the http service implementation replacement was successful, go back to start level 5 (Tier 1 services):

g! frameworklevel 5
g! lb
START LEVEL 5
ID|State |Level|Name
0|Active | 0|System Bundle (3.0.1)
1|Active | 1|Apache Felix Bundle Repository (1.6.2)
2|Active | 1|Apache Felix Gogo Command (0.6.0)
3|Active | 1|Apache Felix Gogo Runtime (0.6.0)
4|Active | 1|Apache Felix Gogo Shell (0.6.0)
5|Active | 2|Bookshelf Inventory API (1.5.0)
6|Active | 1|Apache Felix iPOJO (1.6.4)
7|Active | 2|Bookshelf Inventory Impl - Mock (1.9.0)
8|Active | 1|Bookshelf Log Helper API (1.10.0)
9|Active | 1|Apache Felix Log Service (1.0.0)
10|Active | 1|Bookshelf Log Helper Impl (1.10.0)
11|Active | 3|Bookshelf Service (1.10.0)
12|Active | 5|Apache Felix iPOJO Gogo Command (1.0.0)
13|Active | 5|Bookshelf Service Gogo commands (1.10.0)
17|Active | 1|Apache Commons IO Bundle (1.4.0)
18|Active | 1|Apache Commons FileUpload Bundle (1.2.1)
19|Active | 1|JSON (20090211.0.0)
20|Active | 5|Apache Felix Web Management Console (3.1.2)
21|Active | 5|Apache Felix iPOJO WebConsole Plugins (1.4.4)
22|Active | 4|OPS4J Pax Web - Jetty Bundle (0.7.3)
23|Active | 4|OPS4J Pax Web - Extender - WAR (0.7.3)

24|Active | 4|OPS4J Pax Web - Jsp Support (0.7.3)


You can use the Felix Web Management Console to test that the replacement was successful. It should both work exactly as it did before.

What just happened?

In the steps we've just followed, we have replaced the OSGi Http Service implementation we're using: we've switched from the Apache Felix Http Service to the Pax Web implementation.

From a strict point of view, it is not necessary to change start levels before applying this replacement. However, it's usually a good idea to drop the level and put the frontend support in maintenance mode while changing the http service implementation.

The framework is now ready to receive web application bundle deployments, so let's start writing ours.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.179.100