Spring Dynamic Modules in Action

Book description

Spring Dynamic Modules in Action is a comprehensive tutorial that presents OSGi concepts and maps them to the familiar ideas of the Spring framework. In it, you'll learn to effectively use Spring DM. You will master powerful techniques like embedding a Spring container inside an OSGi bundle, and see how Spring's dependency injection compliments OSGi. Along the way, you'll learn to handle data access and web-based components, and explore topics like unit testing and configuration in OSGi.



About the Technology

Spring Dynamic Modules is a flexible OSGi-based framework that makes component building a snap. With Spring DM, you can easily create highly modular applications and you can dynamically add, remove, and update your modules.



About the Book


What's Inside
  • An introduction to OSGi for Spring developers
  • How to use Spring with Spring DM
  • How to develop enterprise OSGi applications


About the Reader

This book assumes a background in Spring but requires no prior exposure to OSGi or Spring Dynamic Modules.



About the Authors

A Java EE architect, Arnaud Cogoluègnes specializes in middleware. Thierry Templier is a Java EE and rich web architect. He contributed the JCA and Lucene to Spring. Andy Piper is a software architect with Oracle and a committer on the Spring DM project.



Quotes
"A crucial book."
- Peter Kriens, OSGi Technical Director

"A uniquely informative book and a vital reference."
- John Guthrie, Sybase, Inc.

"Dynamic modules sans voodoo: the best resource out there!"
- David Dossot, Co-Author of Mule in Action

"Incredibly useful and accessible...will save you days or weeks of effort!"
- Peter Pavlovich, Kronos Incorporated

"Right book, right time."
- Denys Kurylenko, LinkedIn Corp.

Table of contents

  1. Copyright
  2. foreword
  3. preface
  4. acknowledgments
    1. Arnaud CogoluÈgnes
    2. Thierry Templier
    3. Andy Piper
  5. about this book
    1. Who should read this book
    2. Roadmap
    3. Code
    4. Author online
  6. about the authors
  7. about the title
  8. about the cover illustration
  9. 1. Spring DM basics
    1. 1. Modular development with Spring and OSGi
      1. 1.1 Java modularity
        1. 1.1.1 What is modularity and what is it good for?
        2. 1.1.2 Java—the end and the beginning
        3. 1.1.3 Are your applications really modular?
      2. 1.2 The Spring Framework
        1. 1.2.1 Loose coupling of classes
        2. 1.2.2 Dependency injection
        3. 1.2.3 Aspect-oriented programming (AOP)
        4. 1.2.4 Enterprise support
      3. 1.3 A new approach to modular development with OSGi
        1. 1.3.1 Aims of OSGi
        2. 1.3.2 OSGi layers
          1. MODULE LAYER
          2. LIFECYCLE LAYER
          3. SERVICE REGISTRY LAYER
        3. 1.3.3 What OSGi offers
      4. 1.4 Using Spring in an OSGi environment with Spring DM
        1. 1.4.1 What is Spring DM?
        2. 1.4.2 Embedding Spring within an OSGi container
          1. SPRING MANAGEMENT WITH SPRING DM
          2. OSGI SERVICE SUPPORT WITHIN SPRING DM
        3. 1.4.3 Benefits of Spring DM for real-life OSGi applications
      5. 1.5 Spring DM Hello World
        1. 1.5.1 Provisioning the OSGi container
        2. 1.5.2 Writing the Spring DM–powered bundle
        3. 1.5.3 Deploying the bundle
      6. 1.6 Summary
    2. 2. Understanding OSGi technology
      1. 2.1 OSGi components
        1. 2.1.1 Component structure
        2. 2.1.2 Component configuration
        3. 2.1.3 OSGi containers
        4. 2.1.4 OSGi component lifecycle
      2. 2.2 Component dependencies
        1. 2.2.1 Classloader isolation and chaining
        2. 2.2.2 Providing dependencies
        3. 2.2.3 Consuming dependencies with the Import-Package header
        4. 2.2.4 Consuming dependencies with the Require-Bundle header
        5. 2.2.5 Matching and versioning
          1. VERSION MATCHING
          2. OPTIONAL DEPENDENCIES
          3. ATTRIBUTE MATCHING
      3. 2.3 Interacting with the OSGi container
        1. 2.3.1 Bundles
        2. 2.3.2 Lifecycle management
        3. 2.3.3 Properties
        4. 2.3.4 Event support
        5. 2.3.5 Persistent storage area
        6. 2.3.6 Bundle activator
      4. 2.4 Service support in OSGi
        1. 2.4.1 Providing services
        2. 2.4.2 Using services
          1. BASIC APPROACH
          2. SERVICETRACKER
        3. 2.4.3 Service event support
      5. 2.5 Handling native code
      6. 2.6 Diagnosing errors
        1. 2.6.1 Detecting components with problems
        2. 2.6.2 Detecting different kinds of problems
          1. MISSING IMPORT-PACKAGE
          2. ERROR DURING COMPONENT INITIALIZATION
      7. 2.7 Summary
    3. 3. Getting started with Spring DM
      1. 3.1 Using Spring in OSGi components
        1. 3.1.1 Embedding the Spring application context within components
        2. 3.1.2 Spring DM's OSGi-aware application context
        3. 3.1.3 Spring DM's extender mechanisms
        4. 3.1.4 Kinds of supported bundles
        5. 3.1.5 Spring DM's osgi namespace
      2. 3.2 Installing Spring DM
        1. 3.2.1 Configuring a container
        2. 3.2.2 Provisioning a container for simple use
        3. 3.2.3 Provisioning a container for web use
      3. 3.3 Using a fragment to configure the LOG4J bundle
        1. 3.3.1 Using the fragment configuration pattern
        2. 3.3.2 Implementing a fragment
        3. 3.3.3 Installing a fragment into the OSGi container
      4. 3.4 Developing Spring DM bundles
        1. 3.4.1 Creating and configuring a bundle
        2. 3.4.2 Packaging a bundle
        3. 3.4.3 Checking a bundle within a container
        4. 3.4.4 Developing an integration test
      5. 3.5 Developing Spring DM web bundles
        1. 3.5.1 Creating and configuring a web bundle
        2. 3.5.2 Packaging a web bundle
        3. 3.5.3 Checking the operation of a web bundle in a container
        4. 3.5.4 Developing an integration test for a web bundle
      6. 3.6 Summary
  10. 2. Core Spring DM
    1. 4. Using Spring DM extenders
      1. 4.1 Unleashing Spring DM's standard extender
        1. 4.1.1 A word about dependencies
        2. 4.1.2 Structure of standard Spring OSGi components
          1. DEFAULT BEHAVIOR FOR LOCATING SPRING CONFIGURATION FILES
          2. DEFINING THE LOCATION OF SPRING CONFIGURATION FILES WITH THE SPRING-CONTEXT HEADER
          3. SPRING DM'S RESOURCE LOCATION BEHAVIOR
          4. ORGANIZING SPRING CONFIGURATION FILES IN A BUNDLE
        3. 4.1.3 Initializing and destroying the Spring container
          1. HOW SPRING DM CREATES APPLICATION CONTEXTS
          2. FAILURES DURING CREATION AND THE EXTENDER MODEL
          3. HOW SPRING DM DESTROYS APPLICATION CONTEXTS
          4. STOPPING THE EXTENDER
        4. 4.1.4 Customizing application context creation
          1. CREATE-ASYNCHRONOUSLY
          2. WAIT-FOR-DEPENDENCIES
          3. TIMEOUT
          4. PUBLISH-CONTEXT
        5. 4.1.5 Listening to extender events with the whiteboard pattern
          1. THE SPRING DM EVENT MECHANISM
          2. THE WHITEBOARD PATTERN
        6. 4.1.6 Hard dependencies on the OSGi environment
          1. USING THE OSGI BUNDLE CONTEXT IN SPRING BEANS
          2. WORKING WITH BUNDLES
      2. 4.2 Unleashing Spring DM's web extender
        1. 4.2.1 Structure of Spring DM web OSGi components
        2. 4.2.2 Classloading in web bundles
        3. 4.2.3 OSGi-aware Spring web container
        4. 4.2.4 Spring DM web deployer
      3. 4.3 Summary
    2. 5. Working with OSGi services
      1. 5.1 Dependency injection and OSGi services
        1. 5.1.1 Combining OSGi services and dependency injection
          1. GENERAL CONCEPTS
          2. SERVICE PROXYING
        2. 5.1.2 XML-based registration and referencing
          1. EXPORTING SERVICES
          2. REFERENCING SERVICES
        3. 5.1.3 Annotation-based service referral
      2. 5.2 The thread context classloader and its use in OSGi
        1. 5.2.1 Using the thread context classloader
        2. 5.2.2 Using the thread context classloader with OSGi
      3. 5.3 Advanced OSGi service configuration
        1. 5.3.1 Configuration for registering services
          1. BEAN REFERENCE
          2. SERVICE INTERFACE SUPPORT
          3. SERVICE PROPERTY SUPPORT
          4. MANAGING THE CLASSLOADING CONTEXT
          5. SERVICE-RANKING SUPPORT
          6. BUNDLE SCOPE
        2. 5.3.2 Configuration for referencing services
          1. SERVICE INTERFACE SUPPORT
          2. SERVICE AVAILABILITY IN REFERENCING
          3. CLASSLOADER MANAGEMENT
          4. SERVICE SELECTION
      4. 5.4 Handling OSGi service dynamics
        1. 5.4.1 Service registration and unregistration events
        2. 5.4.2 Service bind and unbind events
      5. 5.5 Handling collections of OSGi services
        1. 5.5.1 Configuring collections
        2. 5.5.2 Sorting collections
        3. 5.5.3 Greedy proxying
        4. 5.5.4 Integrated support when collections are updated
      6. 5.6 Programmatic service support
        1. 5.6.1 Registering a service programmatically
        2. 5.6.2 Referencing services programmatically
        3. 5.6.3 ServiceReference support
      7. 5.7 Summary
    3. 6. OSGi and Spring DM for enterprise applications
      1. 6.1 Building an OSGi repository for enterprise applications
        1. 6.1.1 Using Java and Java EE frameworks in OSGi environments
        2. 6.1.2 Choosing the right frameworks for OSGi
        3. 6.1.3 Getting OSGi-ready artifacts
      2. 6.2 OSGi-ifying libraries and frameworks
        1. 6.2.1 How to create OSGi-ified versions of libraries
          1. IMPORTING PACKAGES
          2. EXPORTING PACKAGES
          3. GIVING AN IDENTITY TO A BUNDLE
        2. 6.2.2 Converting by hand
        3. 6.2.3 Converting using tools
          1. THE BND TOOL
          2. THE FELIX BUNDLE PLUGIN FOR MAVEN 2
        4. 6.2.4 Packaging your own modules as OSGi bundles
      3. 6.3 Designing OSGi enterprise applications
        1. 6.3.1 Organizing OSGi components
          1. ORGANIZING THE DEPENDENCIES
          2. ORGANIZING THE APPLICATION
        2. 6.3.2 Defining interactions between application bundles
      4. 6.4 How Spring DM handles OSGi applications' dynamic behavior
        1. 6.4.1 Dealing with the appearance or disappearance of services
          1. DEALING WITH AN INDIVIDUAL SERVICE REFERENCE
          2. DEALING WITH A COLLECTION OF SERVICE REFERENCES
          3. REACTING TO THE APPEARANCE AND DISAPPEARANCE OF SERVICES
        2. 6.4.2 Providing a new version of a component
      5. 6.5 Summary
    4. 7. Data access in OSGi with Spring DM
      1. 7.1 Using JDBC within OSGi with Spring DM
        1. 7.1.1 JDBC concepts
        2. 7.1.2 JDBC issues when used within OSGi
        3. 7.1.3 Configuring JDBC data sources
          1. CONFIGURING A POOL BUNDLE
          2. CONFIGURING A DATA SOURCE WITH SPRING DM
        4. 7.1.4 Provisioning the OSGi container for JDBC
        5. 7.1.5 Using JDBC within OSGi with Spring DM
          1. SPRING JDBC SUPPORT
          2. REFERENCING JDBC DATA SOURCES IN SPRING DM
          3. USING THE JDBCTEMPLATE CLASS
      2. 7.2 Using ORM within OSGi with Spring DM
        1. 7.2.1 Object/relational mapping
          1. JPA CONCEPTS
          2. JAVA PERSISTENCE API
        2. 7.2.2 Load-time weaving
          1. LOAD-TIME WEAVING CONCEPTS
          2. EQUINOX ASPECTS
          3. EQUINOX ASPECTS ADAPTER FOR SPRING
        3. 7.2.3 Provisioning a container for JPA implementations
          1. COMMON SPRING JPA COMPONENTS
          2. PROVISIONING FOR HIBERNATE JPA
          3. PROVISIONING FOR OPENJPA
          4. PROVISIONING FOR ECLIPSELINK
        4. 7.2.4 Using JPA in OSGi with Spring DM
          1. CONFIGURING JPA WITH SPRING SUPPORT
          2. USING JPA WITH JPATEMPLATE AND SPRING DM
        5. 7.2.5 JPA implementation specifics when used with Spring DM
          1. GENERAL ISSUES WITH OSGI
          2. USING SPRING LTW AND JPA
          3. SPECIFIC CONFIGURATION FOR HIBERNATE JPA
          4. SPECIFIC CONFIGURATION FOR OPENJPA
        6. 7.2.6 A JPA summary
      3. 7.3 Transactions
        1. 7.3.1 Spring's transactional support
        2. 7.3.2 Using JPA transactions with Spring DM
      4. 7.4 Using the open EntityManager in view pattern
        1. 7.4.1 The open EntityManager in view pattern
        2. 7.4.2 Using the open EntityManager in view pattern with Spring DM
      5. 7.5 Summary
    5. 8. Developing OSGi web components with Spring DM and web frameworks
      1. 8.1 Using action-based web frameworks with Spring DM
        1. 8.1.1 Using Spring DM with action-based frameworks
        2. 8.1.2 Using Spring MVC with Spring DM
          1. INSTALLING SPRING MVC
          2. CONFIGURING SPRING MVC FOR SPRING DM
          3. USING ANNOTATION-BASED SUPPORT
          4. CONFIGURING AND USING JSTL
      2. 8.2 Using component-based web frameworks with Spring DM
        1. 8.2.1 Using Spring DM with component-based frameworks
        2. 8.2.2 Using JSF with Spring DM
          1. INSTALLING MYFACES
          2. CONFIGURING JSF SPRING INTEGRATION FOR SPRING DM
          3. USING JSF WITH SPRING DM
        3. 8.2.3 Using Wicket with Spring DM
          1. INSTALLING WICKET
          2. CONFIGURING WICKET SPRING INTEGRATION FOR SPRING DM
          3. USING SPRING DM WITHIN WICKET PAGES
      3. 8.3 Using AJAX frameworks with Spring DM
        1. 8.3.1 Using Spring DM with AJAX frameworks
        2. 8.3.2 Using DWR with Spring DM
          1. INSTALLING DWR
          2. CONFIGURING DWR'S SPRING INTEGRATION FOR SPRING DM
          3. USING SPRING DM WITHIN DWR
        3. 8.3.3 Using GWT with Spring DM
          1. INSTALLING GWT
          2. CONFIGURING GWT SPRING INTEGRATION FOR SPRING DM
          3. USING SPRING DM WITH GWT
      4. 8.4 Using web services with Spring DM
        1. 8.4.1 Using Spring DM with web service frameworks
        2. 8.4.2 Using Spring WS with Spring DM
          1. INSTALLING SPRING WS
          2. CONFIGURING SPRING WS FOR SPRING DM
          3. USING SPRING WS WITH SPRING DM
        3. 8.4.3 Using Restlet with Spring DM
          1. INSTALLING RESTLET
          2. CONFIGURING RESTLET FOR SPRING DM
          3. USING RESTLET WITH SPRING DM
      5. 8.5 Summary
  11. 3. Advanced topics
    1. 9. Advanced concepts
      1. 9.1 Configuring Spring DM core components
        1. 9.1.1 Fragment-based configuration
        2. 9.1.2 Features configurable through named beans
      2. 9.2 Extending the standard extender
        1. 9.2.1 Beans usable for configuration
        2. 9.2.2 Task executor for creating application contexts
        3. 9.2.3 Task executor for destroying application contexts
        4. 9.2.4 Extender properties
        5. 9.2.5 Propagating application context events
        6. 9.2.6 Overriding application context creation
          1. FILTERING POTENTIAL SPRING-POWERED BUNDLES
          2. OVERRIDING THE DEFAULT SCANNING PROCESS OF SPRING CONFIGURATION FILES
          3. WHEN TO OVERRIDE THE APPLICATIONCONTEXTCREATOR
        7. 9.2.7 Adding postprocessing to application contexts
        8. 9.2.8 Overriding the default OSGi application context listener
        9. 9.2.9 How SpringSource dm Server customizes Spring DM's extender
          1. FINDING THE EXTENDER FRAGMENT WITH THE DM SHELL
          2. ANALYZING THE EXTENDER FRAGMENT
      3. 9.3 Extending the web extender and WAR deployer
        1. 9.3.1 Beans available for configuration
        2. 9.3.2 Overriding the WAR deployer
        3. 9.3.3 Overriding the context path strategy
        4. 9.3.4 Overriding the WAR scanner
      4. 9.4 Configuring embedded web containers
        1. 9.4.1 The basics of Spring DM's web support
        2. 9.4.2 Support for Tomcat
          1. USING TOMCAT 6.0
          2. OVERRIDING THE DEFAULT CONFIGURATION
          3. CONFIGURING CATALINA, TOMCAT'S SERVLET CONTAINER
        3. 9.4.3 Support for Jetty
          1. USING JETTY WITH SPRING DM
          2. OVERRIDING THE DEFAULT CONFIGURATION
      5. 9.5 Support for Java 2 security
        1. 9.5.1 The Java security model
        2. 9.5.2 The OSGi security model
        3. 9.5.3 Integrating Spring DM into the OSGi security model
      6. 9.6 Advanced patterns
        1. 9.6.1 Implementation provider pattern
        2. 9.6.2 Chained classloader pattern for proxy-based AOP
      7. 9.7 Summary
    2. 10. Testing with Spring DM
      1. 10.1 Testing OSGi components with Spring DM
        1. 10.1.1 General concepts
        2. 10.1.2 Unit tests with Spring-based applications
        3. 10.1.3 Testing OSGi components
          1. HOW SPRING DM CAN HELP TEST OSGI COMPONENTS
          2. HOW TO ORGANIZE OSGI TESTS
      2. 10.2 Strict unit tests for OSGi components
        1. 10.2.1 Spring DM's OSGi mocks
        2. 10.2.2 Spring DM's OSGi mocks in action
      3. 10.3 Integration tests for OSGi applications
        1. 10.3.1 Developing integration tests with Spring DM support
          1. CREATING A SIMPLE INTEGRATION TEST
          2. INTRODUCING THE SAMPLE APPLICATION
          3. TESTING THE DOMAIN AND DAO API PACKAGES EXPORTATION
          4. TESTING THE DAO IMPLEMENTATION BUNDLE
        2. 10.3.2 Advanced features of Spring DM test support
          1. HOOKS OF THE ABSTRACTCONFIGURABLEBUNDLECREATORTESTS CLASS
          2. CUSTOMIZING THE GENERATED MANIFEST
          3. CHOOSING THE OSGI PLATFORM
      4. 10.4 Summary
    3. 11. Support for OSGi compendium services
      1. 11.1 Overview of compendium services
        1. 11.1.1 What are compendium services?
        2. 11.1.2 Spring DM's support for compendium services
          1. CONFIGURATION ADMIN SERVICE
          2. EVENT ADMIN SERVICE
          3. CONFIGURING THE OSGIX XML NAMESPACE
      2. 11.2 Spring DM's Configuration Admin Service support
        1. 11.2.1 OSGi Configuration Admin Service
          1. INSTALLING THE CONFIGURATION ADMIN SERVICE
          2. ACCESSING THE CONFIGURATION ADMIN SERVICE WITH SPRING DM
          3. INTERACTING WITH THE CONFIGURATION ADMIN SERVICE
        2. 11.2.2 Using properties defined by the Configuration Admin Service
        3. 11.2.3 Support of managed entities
          1. USING MANAGED RESOURCES DIRECTLY
          2. MANAGED SERVICE SUPPORT
          3. MANAGED SERVICE FACTORY SUPPORT
      3. 11.3 Spring DM's Event Admin Service support
        1. 11.3.1 OSGi Event Admin Service
          1. INSTALLING THE EVENT ADMIN SERVICE
          2. ACCESSING THE EVENT ADMIN SERVICE USING SPRING DM
          3. INTERACTING WITH THE EVENT ADMIN SERVICE
        2. 11.3.2 Linking Spring DM and the OSGi Event Admin Service
          1. HANDLING SPRING DM EVENTS
          2. HANDLING SPRING EVENTS
        3. 11.3.3 Implementing the bridge between Spring DM and Event Admin Service
        4. 11.3.4 Implementing OSGi event handlers
      4. 11.4 Summary
    4. 12. The Blueprint specification
      1. 12.1 Standardization of Spring DM
        1. 12.1.1 The attraction of open standards
        2. 12.1.2 Standards development
        3. 12.1.3 Goals of the Blueprint specification
        4. 12.1.4 Scope of the specification
      2. 12.2 A taxonomy of Blueprint
        1. 12.2.1 A Blueprint example
        2. 12.2.2 Blueprint bundles
      3. 12.3 Blueprint manager syntax
        1. 12.3.1 Bean manager
        2. 12.3.2 Service manager
        3. 12.3.3 Reference manager
        4. 12.3.4 Reference-list manager
        5. 12.3.5 A Blueprint example
        6. 12.3.6 The Blueprint container and its metadata
        7. 12.3.7 Environment managers
      4. 12.4 Runtime support and lifecycle
        1. 12.4.1 Blueprint lifecycle
          1. LAZY INITIALIZATION
          2. CONTROL DIRECTIVES
          3. LIFECYCLE EVENTS
          4. EVENT ADMIN MAPPING
        2. 12.4.2 Type converters
      5. 12.5 Using Spring DM with Blueprint
      6. 12.6 Summary
  12. A. Spring DM development with Eclipse
    1. A.1 Installing and configuring Eclipse for Spring DM
      1. A.1.1 Installing Eclipse
      2. A.1.2 Installing Spring IDE for Spring DM
        1. INSTALLING SPRING IDE
        2. SPRING DM SUPPORT FOR SPRING IDE
      3. A.1.3 Configuring the target platform
        1. CONFIGURATION WITHOUT SPRING IDE SUPPORT
        2. USING SPRING IDE SUPPORT FOR THE TARGET PLATFORM
    2. A.2 Developing OSGi components
      1. A.2.1 Simple Spring DM components
      2. A.2.2 OSGi fragments
      3. A.2.3 Spring DM web components
    3. A.3 Executing in the Equinox container
      1. A.3.1 Creating and configuring the Equinox container
      2. A.3.2 Running the Equinox container
      3. A.3.3 Equinox console
    4. A.4 Summary
  13. B. OSGi development with Maven 2
    1. B.1 Installing Maven 2
    2. B.2 Creating a project the Maven 2 way
      1. B.2.1 Creating a simple project
      2. B.2.2 The Maven 2 project structure and the POM file
      3. B.2.3 Compiling and packaging: the build lifecycle
      4. B.2.4 Introducing the dependency management system
        1. DECLARING DEPENDENCIES
        2. TRANSITIVE DEPENDENCIES
        3. REPOSITORIES
        4. OSGI AND SPRING DM DEPENDENCIES
      5. B.2.5 Splitting a Maven 2 project into modules
    3. B.3 Using the Apache Felix Bundle Plugin
      1. B.3.1 Setting up the plug-in
      2. B.3.2 Default behavior
      3. B.3.3 Configuring metadata generation with instructions
      4. B.3.4 Using the plug-in without changing the packaging type
      5. B.3.5 Using a property file for externalization
      6. B.3.6 Integrating with the Eclipse PDE
    4. B.4 Introducing Bundlor and its Maven plug-in
      1. B.4.1 Setting up Bundlor in Maven 2
        1. BASIC USE OF BUNDLOR IN MAVEN 2
        2. CONFIGURING BUNDLOR IN A MULTIMODULE PROJECT
      2. B.4.2 The template mechanism
        1. BUNDLOR'S SPECIFIC HEADERS
        2. USING BUNDLOR'S HEADERS
        3. SUPPORT FOR THE VERSION DIRECTIVE
      3. B.4.3 Bundlor's scanning capabilities for runtime dependencies
        1. DETECTION FROM JAVA CLASSES
        2. DETECTION FROM SPRING CONFIGURATION FILES
        3. DETECTION FROM BLUEPRINT CONFIGURATION FILES
        4. DETECTION FROM JPA'S PERSISTENCE.XML
        5. DETECTION OF CLASSES FROM HIBERNATE'S MAPPING FILES
        6. DETECTION OF CLASSES FROM THE WEB APPLICATION DESCRIPTION FILE, WEB.XML
    5. B.5 Summary
  14. C. Spring DM development with Ant and Ivy
    1. C.1 Installing Ant
    2. C.2 Creating a Spring DM bundle with Ant
      1. C.2.1 Structure and content of the project
      2. C.2.2 The Ant build file
      3. C.2.3 Using Bnd with Ant to package the bundle
        1. INSTALLING BND FOR ANT
        2. PACKAGING THE BUNDLE WITH THE BND TASK
    3. C.3 Provisioning with Apache Ivy
      1. C.3.1 Installing Ivy for Ant
      2. C.3.2 Configuring repositories for Ivy
      3. C.3.3 Retrieving Spring DM dependencies with Ivy
    4. C.4 Developing an integration test
      1. C.4.1 Writing and compiling the integration test
      2. C.4.2 Customizing Spring DM's test framework to use Ivy's dependencies
      3. C.4.3 Running the test with Ant
    5. C.5 Summary
  15. D. OSGi development with the Pax tools
    1. D.1 Pax Runner
      1. D.1.1 Installing Pax Runner
      2. D.1.2 Pax Runner syntax
      3. D.1.3 Pax Runner options
        1. CHOOSING THE TARGET PLATFORM
        2. TUNING THE JVM PROCESS OF THE OSGI RUNTIME
        3. CHOOSING A WORKING DIRECTORY AND CLEANING IT OUT
      4. D.1.4 Pax Runner provision specs
        1. PROVISIONING FROM THE FILESYSTEM
        2. PROVISIONING FROM A ZIP FILE
        3. PROVISIONING FROM A LOCAL MAVEN 2 REPOSITORY
        4. PROVISIONING FROM A TEXT FILE
        5. PROVISIONING OPTIONS
        6. GUIDELINES FOR PROVISIONING
      5. D.1.5 Pax Runner profiles
      6. D.1.6 Using a text file for the options
    2. D.2 Pax Construct
      1. D.2.1 Installing Pax Construct
      2. D.2.2 Creating a module-based project
      3. D.2.3 Setting up the project for Spring DM
      4. D.2.4 Creating a bundle fragment for the logging configuration
      5. D.2.5 Creating the data source bundle
      6. D.2.6 Creating the database client bundle
      7. D.2.7 Using a connection pool for the data source
        1. OSGI-IFYING DBCP WITH PAX CONSTRUCT
        2. CONFIGURING THE DATA SOURCE BUNDLE WITH THE CONNECTION POOL
    3. D.3 Summary

Product information

  • Title: Spring Dynamic Modules in Action
  • Author(s): Arnaud Cogoluegnes, Thierry Templier, Andy Piper
  • Release date: September 2010
  • Publisher(s): Manning Publications
  • ISBN: 9781935182306