Name: sample.osgi.blueprint-cm
Owner: WASdev
Description: Demonstrating blueprint-cm enablement in Liberty
Created: 2015-05-28 14:55:30.0
Updated: 2016-02-07 03:29:16.0
Pushed: 2015-06-11 12:11:24.0
Homepage: null
Size: 172
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This sample demonstrates the use of Config Admin and custom Blueprint namespace handlers in OSGi applications on the Liberty profile. I blogged about these capabilities in September 2014 when they were new out in beta. Everything demonstrated in this sample will be fully supported in the upcoming June 26th 2015 release of WebSphere Application Server V8.5.5.6 Liberty Profile.
The sample illustrates the use of the following things, all in an OSGi application running on Liberty:
This readme file focuses on how to install and test the sample. A separate article will provide a broader overview of the sample and its purpose.
The sample comprises a single OSGi application, checked into Git as a set of Eclipse projects. Three projects correspond to OSGi bundles; the fourth aggregates those bundles into an OSGi application. The sample can be run from inside Eclipse once four open source bundles have been downloaded and imported into the Eclipse workspace.
Install a recent Eclipse driver. I've been using Eclipse Luna SR2. This version of Eclipse comes with built-in Git support.
Install the WebSphere Application Server Development Tools (WDT) into Eclipse via https://eclipse.org/downloads/
Window > Preferences > Server > Runtime Environments > Add > WebSphere Application Server V8.5 Liberty Profile. Download a new runtime or reuse an existing one.
Create a new server: New > Server > WebSphere Application Server V8.5 Liberty Profile
Download the four bundles listed below. The simplest place to get them is Maven Central. It's probably ok to use later versions, but the links are to the level of each bundle that I've used in developing and testing the sample.
Load them into Eclipse: File > Import > OSGi Bundle or Fragment. Select the WebSphere Application Server Liberty Profile with SPI target runtime.
git clone https://github.com/WASdev/sample.osgi.blueprint-cm. File > Import > Existing projects into workspace. Pull in:
test.blueprint.cm.basic - Blueprint-managed beans
test.bp.cm.eba - OSGi application
test.custom.ns.handler - custom Blueprint namespace handler provider
test.wab.frontEnd - a simple web interface to drive the test
Create a new Server. In the 'Servers' view, right click > New > Server > WebSphere Application Server Liberty Profile.
Double click the 'Server Configuration' and add these features:
wab-1.0
jndi-1.0
Run the test! In the enterprise explorer view, test.wab.frontEnd > WebContent > index.html. Right click > Run As > Run on Server. Select the Liberty server and add the test.bp.cm.eba to the server. This should launch a web browser with a simple form in. Fill in some values (anything will do) and click 'Send'. Check the 'Console' view to see various results in the messages.log.
Again, please see the associated article for more information on what this sample is showing.