contents


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.6 Lifecycle and modularity
3.7 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