Pro Spring Dynamic Modules for OSGi™ Service Platforms

Book description

Spring and OSGi's features are a natural fit; they are orthogonal to each other. The Open Services Gateway initiative (OSGi) is about packaging, deployment, and versioning issues, while Spring is about providing the necessary foundation to wire up Java classes in their most basic form using dependency injection and aspect orientation to fulfill an application's purpose.

Pro Spring Dynamic Modules for OSGi™ Service Platforms by Daniel Rubio is the first book to cover OSGi as practically implemented by the world's most popular, agile, and open-source enterprise Java framework, Spring.

  • Covers the ease at which OSGi is used with the Spring Framework in development, packaging, versioning, and deployment.

  • Enterprises are trusting Spring more and more, and this book leverages OSGi in a way that can "complete" the use of Spring in the enterprise, as OSGi is already being trusted and adopted by IBM, BEA, and others.

  • The text discusses how Spring OSGi makes your Spring applications trusted SOA applications.

Table of contents

  1. Copyright
  2. About the Author
  3. About the Technical Reviewer
  4. Acknowledgments
  5. Introduction
    1. Who This Book Is For
    2. How This Book Is Structured
    3. Prerequisites
    4. Downloading the Code
    5. Contacting the Author
  6. 1. Introducing OSGi
    1. 1.1. OSGi Concepts and Architecture
      1. 1.1.1. Java's Virtual Machine, Java Classes, and the CLASSPATH Variable
      2. 1.1.2. The OSGi Bundle
      3. 1.1.3. The OSGi Framework
    2. 1.2. OSGi Hello World Application
      1. 1.2.1. Prerequisites and Downloads
      2. 1.2.2. Your First OSGi Bundles
      3. 1.2.3. The Http Service OSGi Bundle
      4. 1.2.4. OSGi Bundle for the Web
      5. 1.2.5. Updating OSGi Bundles
      6. 1.2.6. OSGi Hello World Application Conclusions
    3. 1.3. Summary
  7. 2. Introducing Spring
    1. 2.1. Spring Concepts and Architecture
      1. 2.1.1. Inversion of Control and Dependency Injection
      2. 2.1.2. Plain Old Java Objects
      3. 2.1.3. Spring Portfolio
    2. 2.2. Spring Hello World Application
      1. 2.2.1. Prerequisites and Downloads
      2. 2.2.2. The Domain Model
      3. 2.2.3. Persisting the Domain Model with JPA
      4. 2.2.4. Testing Your Domain Model
      5. 2.2.5. Using Spring's MVC
      6. 2.2.6. Deploying on the Web
    3. 2.3. Summary
  8. 3. Integrating Spring and OSGi
    1. 3.1. OSGi's Synergy with Spring
    2. 3.2. Layers of Integration
      1. 3.2.1. Application Design: Services and Beans
      2. 3.2.2. Application Packaging: Dependencies
      3. 3.2.3. Application Servers: Classpath Loaders
    3. 3.3. OSGi and Spring Hello World Application
      1. 3.3.1. Prerequisites and Downloads
      2. 3.3.2. The Domain Model
      3. 3.3.3. Web Application
      4. 3.3.4. Deploying Spring-OSGi Bundles
    4. 3.4. Summary
  9. 4. Spring Dynamic Modules for OSGi
    1. 4.1. Extenders and Fragments in Spring-DM
    2. 4.2. Registering OSGi Services Through Spring-DM
    3. 4.3. Locating OSGi Services Through Spring-DM
    4. 4.4. OSGi Bundle Activities with Spring-DM
    5. 4.5. OSGi Fragments with Spring-DM
    6. 4.6. Summary
  10. 5. SpringSource dm Server
    1. 5.1. Benefits
      1. 5.1.1. OSGi Deployment in the Enterprise
      2. 5.1.2. Spring, OSGi, and Java Integration
      3. 5.1.3. Java EE Native and Shared Library WAR Support
      4. 5.1.4. Tooling and Administration Support
    2. 5.2. Concepts and Architecture
      1. 5.2.1. Deployment Units
      2. 5.2.2. Libraries
      3. 5.2.3. Directory Structure
    3. 5.3. SpringSource dm Server Hello World Application
      1. 5.3.1. Prerequisites and Downloads
      2. 5.3.2. Application Classes
      3. 5.3.3. Application Bundles, Manifests, and Descriptors
      4. 5.3.4. Building and Deploying the Application
    4. 5.4. Summary
  11. 6. Versioning with OSGi and Spring
    1. 6.1. Benefits and Concepts
    2. 6.2. OSGi Package Versioning Behaviors
    3. 6.3. OSGi Service Versioning Behaviors
    4. 6.4. OSGi Bundle Versioning Behaviors
    5. 6.5. OSGi Fragment Versioning Behaviors
    6. 6.6. OSGi Spring-DM and SpringSource dm Server Versioning Behaviors
    7. 6.7. Summary
  12. 7. Data Access and Bundle Management Without SpringSource dm Server
    1. 7.1. Access to RDBMSs
    2. 7.2. Introducing the BND Tool
    3. 7.3. Hello World Application Revisited Without the SpringSource dm Server: Data Access and Apache Ivy
      1. 7.3.1. Prerequisites and Downloads
      2. 7.3.2. Building and Deploying the Application
    4. 7.4. Summary
  13. 8. Web Applications Using Spring and OSGi
    1. 8.1. Web Bundle Concepts
    2. 8.2. Using Different Web Containers
      1. 8.2.1. Overriding the Default Extender Value
      2. 8.2.2. Bootstrapping the Web Container
      3. 8.2.3. Using the Jetty Web Container
    3. 8.3. Using SSL/TLS with OSGi
      1. 8.3.1. Setting Up SSL in Apache Tomcat
      2. 8.3.2. Creating a JKS Keystore
      3. 8.3.3. Fulfilling Apache Tomcat's SSL Dependencies
      4. 8.3.4. Creating the SSL Configuration Fragment
      5. 8.3.5. Installing the Fragment
    4. 8.4. Using Flex with OSGi
      1. 8.4.1. Laying Out a Flex User Interface
      2. 8.4.2. Calling Back to the Server
      3. 8.4.3. Configuring OSGi and Flex
    5. 8.5. Summary
  14. 9. Testing with Spring and OSGi
    1. 9.1. Testing with OSGi and Spring-DM
    2. 9.2. Unit and Integration Revisited: Testing OSGi Applications Without OSGi
    3. 9.3. Spring-DM's Testing Framework
      1. 9.3.1. Creating a Spring-DM Test Class
      2. 9.3.2. Downloading Spring-DM Test Dependencies with Apache Ivy
      3. 9.3.3. Executing a Spring-DM Test with Apache Ant
    4. 9.4. Hello World Application Spring-DM Test
    5. 9.5. Summary

Product information

  • Title: Pro Spring Dynamic Modules for OSGi™ Service Platforms
  • Author(s):
  • Release date: February 2009
  • Publisher(s): Apress
  • ISBN: 9781430216124