OSGi in Action
Creating Modular Applications in Java
Richard S. Hall, Karl Pauls, Stuart McCulloch, and David Savage
Foreword by Peter Kriens
  • April 2011
  • ISBN 9781933988917
  • 576 pages
  • printed in black & white

"An impressive book."

Peter Kriens, OSGi Technical Director

OSGi is a Java-based framework for creating applications as a set of interconnected modules. OSGi lets you install, start, stop, update, or uninstall modules at execution time without taking down your entire system. It's the backbone of the Eclipse plugin system, as well as many Java EE containers, such as GlassFish, Geronimo, and WebSphere.

OSGi in Action provides a clear introduction to OSGi concepts with examples that are relevant both for architects and developers. You'll start with the central ideas of OSGi: bundles, module lifecycles, and interaction among application components. With the core concepts well in hand, you'll explore numerous application scenarios and techniques. You'll learn how to migrate legacy systems to OSGi and how to test, debug, and manage applications.

Table of Contents show full

foreword

preface

acknowledgments

about this book

about the authors

Part 1 Introducing OSGi: modularity, lifecycle, and services

1. OSGi revealed

1.1. The what and why of OSGi

1.2. An architectural overview of OSGi

1.3. “Hello, world!” examples

1.4. Putting OSGi in context

1.5. Summary

2. Mastering modularity

2.1. What is modularity?

2.2. Why modularize?

2.3. Modularizing a simple paint program

2.4. Introducing bundles

2.5. Defining bundles with metadata

2.6. Finalizing the paint program design

2.7. OSGi dependency resolution

2.8. Reviewing the benefits of the modular paint program

2.9. Summary

3. Learning lifecycle

3.1. Introducing lifecycle management

3.2. OSGi bundle lifecycle

3.3. Using the lifecycle API in your bundles

3.4. Dynamically extending the paint program

3.5. Lifecycle and modularity

3.6. Summary

4. Studying services

4.1. The what, why, and when of services

4.2. OSGi services in action

4.3. Dealing with dynamics

4.4. Using services in the paint example

4.5. Relating services to modularity and lifecycle

4.6. Standard services

4.7. Summary

5. Delving deeper into modularity

5.1. Managing your exports

5.2. Loosening your imports

5.3. Requiring bundles

5.4. Dividing bundles into fragments

5.5. Dealing with your environment

5.6. Summary

Part 2 OSGi in practice

6. Moving toward bundles

6.1. Turning JARs into bundles

6.2. Splitting an application into bundles

6.3. Summary

7. Testing applications

7.1. Migrating tests to OSGi

7.2. Mocking OSGi

7.3. Advanced OSGi testing

7.4. Summary

8. Debugging applications

8.1. Debugging bundles

8.2. Solving class-loading issues

8.3. Tracking down memory leaks

8.4. Dangling services

8.5. Summary

9. Managing bundles

9.1. Versioning packages and bundles

9.2. Configuring bundles

9.3. Starting bundles lazily

9.4. Summary

10. Managing applications

10.1. Deploying bundles

10.2. Ordering bundle activation

10.3. Summary

Part 3 Advanced topics

11. Component models and frameworks

11.1. Understanding component orientation

11.2. OSGi and components

11.3. Declarative Services

11.4. Summary

12. Advanced component frameworks

12.1. Blueprint Container

12.2. Apache Felix iPOJO

12.3. Mix and match

12.4. Summary

13. Launching and embedding an OSGi framework

13.1. Standard launching and embedding

13.2. Launching the framework

13.3. Embedding the framework

13.4. Summary

14. Securing your applications

14.1. To secure or not to secure

14.2. Security: just do it

14.3. OSGi-specific permissions

14.4. Managing permissions with Conditional Permission Admin

14.5. Digitally signed bundles

14.6. Local permissions

14.7. Advanced permission management

14.8. Bringing it all back home

14.9. Summary

15. Web applications and web services

15.1. Creating web applications

15.2. Providing and consuming web services

15.3. Summary

Appendix A: Building bundles

Appendix B: OSGi standard services

index

© 2014 Manning Publications Co.

About the Technology

OSGi is a Java-based framework for creating applications as a set of interconnected modules. OSGi lets you install, start, stop, update, or uninstall modules at execution time without taking down your entire system. It's the backbone of the Eclipse plugin system, as well as many Java EE containers, such as GlassFish, Geronimo, and WebSphere.

What's inside

  • Core ideas of OSGi
  • Vocabulary, tools, and strategies
  • Applying OSGi

About the reader

This book assumes readers with a working knowledge of Java, but requires no previous exposure to OSGi.

About the authors

Richard S. Hall, Karl Pauls, Stuart McCulloch, and David Savage are all respected Java developers and committers on the Apache Felix OSGi implementation.


combo $49.99 pBook + eBook
eBook $39.99 pdf + ePub + kindle

FREE domestic shipping on three or more pBooks

"A lucid explanation of an intricate topic."

John S. Griffin, Overstock.com

"Easy to read...explains everything you need to know."

Jason Lee, Oracle

"Straight from the experts."

Erik Van Oosten, JTeam

"Hit the ground running with this book."

David Dossot, Coauthor of <i>Mule in Action</i>