SpringSource dm Server™ Programmer Guide

Ramnivas Laddad

Colin Yates

Sam Brannen

Rob Harrop

Christian Dupuis

Andy Wilkinson

SpringSource dm Server™

1.0.2.RELEASE

Copyright © SpringSource Inc., 2009


Table of Contents

1. Preface
2. Prerequisites
2.1. Runtime Environment
2.2. References
3. Introduction to the SpringSource dm Server
3.1. Overview
3.2. What is the SpringSource dm Server?
3.2.1. What makes up the SpringSource dm Server?
3.3. Why the SpringSource dm Server?
3.3.1. Deployment options and migration paths
3.3.2. Simplified development and deployment of OSGi-based applications
3.3.3. Enhanced diagnostics during deployment and in production
4. Deployment Architecture
4.1. Supported Deployment Formats
4.1.1. Raw OSGi Bundles
4.1.2. WAR Deployment Formats
4.1.2.1. Standard WAR
4.1.2.2. Shared Libraries WAR
4.1.2.3. Shared Services WAR
4.1.3. Web Modules
4.1.4. PAR
4.2. Dependency Types
4.3. A guide to forming bundles
5. Developing Applications
5.1. Anatomy of a bundle
5.2. Packaging
5.2.1. PARs
5.2.2. Module
5.2.3. Web Modules
5.2.3.1. Web Module Manifest Headers
5.2.3.2. Web Module web.xml Fragments
5.2.4. WARs
5.3. Programmatic Access to Personality-specific Features
5.3.1. Programmatic Access to Web Personality Features
5.3.1.1. Programmatic Access to the WebApplicationContext
5.3.1.2. Programmatic Access to the BundleContext
5.4. Automatic Imports
5.4.1. Automatic Imports for the Web Personality
5.5. Working with dependencies
5.5.1. Importing libraries
5.5.2. Importing bundles
5.5.3. Defining libraries
5.5.4. Installing dependencies
5.6. Application trace
5.6.1. Using vanilla Log4J
5.7. Application versioning
6. Migrating to OSGi
6.1. Migrating Web Applications
6.1.1. Standard WAR
6.1.2. Shared Libraries WAR
6.1.3. Shared Services WAR
6.1.4. Web Module
6.1.5. Web Migration Summary
6.2. PAR
7. Case study: Migrating the Form Tags sample application.
7.1. Overview of the Form Tags Sample Application
7.2. Form Tags WAR
7.3. Form Tags Shared Libraries WAR
7.4. Form Tags Shared Services WAR
7.4.1. The Service Bundle
7.4.2. Accessing the Service and Types from the WAR
7.5. Form Tags PAR
7.5.1. Granularity of the PAR
7.5.2. Domain and Service Bundles
7.5.3. Form Tags Web Module
7.5.4. Constructing the PAR
7.6. Summary of the Form Tags Migration
8. Tooling
8.1. Installation
8.2. Running a SpringSource dm Server instance within Eclipse
8.3. Bundle and Library Provisioning
8.4. Setting up Eclipse Projects
8.4.1. Creating New Projects
8.4.2. Migrating existing Java Projects
8.5. Developing OSGi Bundles
8.5.1. Resolving Bundle Dependencies
8.5.2. Editing the Manifest
8.6. Deploying Applications
9. Working with Common Enterprise Libraries
9.1. Working with Hibernate
9.1.1. Importing Hibernate
9.2. Working with DataSources
9.3. Weaving and Instrumentation
9.4. JSP Tag Libraries
10. Known Issues
10.1. JPA Entity Scanning