The Blog Sample

Running the Blog Sample



Note: These instructions are for the current development stream of Aries. Instructions for older releases can be found here Instructions for the current release of Aries can be found here


Create the OSGi platform for the Blog sample

Download and build the development stream of Aries, see here

cd samples/blog/blog-assembly/target
mkdir load

The full Aries build builds the blog sample by default, all of the platform pre-reqs will be available in the target directory. Create the load directory. This used to be done automatically by Felix file install, but in more recent versions yo have to create your own.

Running the Blog sample

Start Aries in an OSGi framework (we're using Eclipse Equinox in this case)

java -jar osgi-3.5.0.v20090520.jar -console

The OSGi console should start up, the 'ss' command should show all of the platform bundles in state 'ACTIVE'.

To run the blog application (.eba file) copy

samples/blog/blog-jdbc-eba/target/*.eba

into the load directory.

Point your browser to http://localhost:8080/blog/

If you subsequently delete the .eba from the load directory the application will be uninstalled.

Running the sample using a JPA persistence layer

The first blog sample application was written to use a JDBC persistence layer. There is a second application implemented to demonstrate the JPA capability

To run the blog sample which uses the JPA persistence layer, start the OSGi framework as before, remove any previous copies of the blog sample from the target/load directory, then copy

samples/blog/blog-jpa-eba/target/*.eba

into the load directory.

Finally, after typing 'refresh' at the OSGi console, point your browser at http://localhost:8080/blog/ . You should see something that looks precisely the same as the blog sample running with the JDBC persistence layer, but this time running using the JPA persistence layer.

About the Blog sample

The blog sample components can be visualised like this:

bs