Creating an application with EclipseRT Virgo Web Server

GreenPages: a demonstration

Christopher Frost

Ben Hale

Rob Harrop

Glyn Normington

Steve Powell

Andy Wilkinson

Web Server

2.1.0.RELEASE

Abstract

Spring application programmers are introduced to Virgo Web Server by installing the Web Server and examining a small application called GreenPages. Despite its simplicity, GreenPages is designed to demonstrate many different Web Server features and to act as a template from which other modular applications can be built.

This version of the guide is based on the following software versions:

Web Server2.1.0.RELEASE
GreenPages2.3.0.RELEASE
SpringSource Tool Suite2.5.0.RELEASE
Apache Maven2.2.0

Copyright © 2009, 2010 VMware Inc.

All rights reserved. This document is made available under the terms of the Eclipse Public License v1.0 which is available at http://www.eclipse.org/legal/epl-v10.html.

Java, Sun, and Sun Microsystems are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.

OSGi is a trademark or a registered trademark of the OSGi Alliance in the United States, other countries, or both.

Eclipse is a trademark of Eclipse Foundation, Inc.

UNIX is a registered trademark of The Open Group.

Windows is a registered trademark of Microsoft Corporation in the United States and other countries.

Mac and Mac OS are trademarks of Apple Inc., registered in the U.S. and other countries.


Table of Contents

Preface
1. Concepts
1.1. OSGi concepts
1.2. Spring DM concepts
1.3. Grouping bundles in Web Server
2. Installation
2.1. Pre-requisites
2.2. Installing Web Server
2.3. Installing the SpringSource Tool Suite
2.4. Installing Apache Maven
3. Installing GreenPages
3.1. Introduction
3.2. Obtaining GreenPages
3.3. Building and installing GreenPages
3.4. Browsing the GreenPages application
3.5. Running GreenPages from Eclipse
4. The Web Module
4.1. Introduction
4.2. GreenPages set up
4.3. The controller
4.4. Deploying a bundle
4.5. Creating a PAR
4.6. Referencing an OSGi Service
4.7. Publishing an OSGi Service
5. The Middle Tier
5.1. Introduction
5.2. Creating the DataSource project
5.3. Building the JPA module
5.4. Trying out the JPA middle tier
5.5. Applying best practices to the middle tier
6. Testing GreenPages
6.1. Introduction
6.2. Single bundle integration testing
6.3. Contributing OSGi sourced dependencies
6.4. Multi bundle integration testing
7. Automated Build
7.1. Introduction
7.2. Setting up for Automated Build
7.3. Create POM
7.4. Adding the par plugin
7.5. Adding the dependency plugin
7.6. Automatically running the tests
7.7. Deploying the application
A. Further Resources
A.1. Projects
A.2. Documentation