ISBN 9789350043264,Osgi In Depth

Osgi In Depth



Dreamtech Press

Publication Year 2012

ISBN 9789350043264

ISBN-10 9350043262


Number of Pages 392 Pages
Language (English)

Computer Engineering

 OSGi in Depth presents practical techniques for implementing OSGi, including enterprise services such as management, configuration, event handling, and software component models. You will learn to custom-tailor the OSGi platform, which is itself modular, and discover how to pick and choose services to create domain-specific frameworks for your business. Also, this book shows how you can use OSGi with existing JEE services, such as JNDI and JTA.


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.

Publisher Marketing Description:

Written for Java developers who already know the basics, OSGi in Depthpicks up where OSGi in Action leaves off.



1 OSGi as a new platform for application development
1.1 What are development platforms and application frameworks?
1.2 The OSGi technology
1.3 Benefits of using the OSGi platform
1.4 Building blocks: the essence of OSGi
1.5 Players
1.6 Are we starting from scratch?
1.7 Summary
2 An OSGi framework primer
2.1 Modules and information hiding
2.2 Running and testing OSGi
2.3 Coping with changes to a module
2.4 Services and loose coupling
2.5 The OSGi layered architecture
2.6 Summary
3 The auction application: an OSGi case study
3.1 Establishing the requirements for an auction system
3.2 Modularization and extensibility as application requirements
3.3 Defining the interfaces
3.4 Defining the extension points
3.5 Putting it all together
3.6 The OSGi HTTP service
3.7 Improving the auction application to enterprise grade
3.8 Summary
4 In-depth look at bundles and services
4.1 Restricting a bundle’s export contract
4.2 Expanding a bundle’s export contract
4.3 Packages as requirements and capabilities
4.4 Avoiding the dreaded class-hell problem
4.5 Understanding OSGi’s class loading
4.6 Decoupling bundles using services
4.7 Improve robustness by testing your applications
4.8 Summary
5 Configuring OSGi applications
5.1 The configuration problem
5.2 The Configuration Admin service
5.3 Configuring using complex data types
5.4 Deleting configuration
5.5 Configuring multiple services
5.6 When configuration update fails
5.7 Management agents
5.8 Summary
6 A world of events
6.1 The publish-subscribe model
6.2 The Event Admin
6.3 Advanced event handling
6.4 Event Admin shortcomings
6.5 Decoupling using events
6.6 OSGi framework events
6.7 Summary
7 The persistence bundle
7.1 Bundle’s storage area
7.2 Using JDBC
7.3 Object-relation mapping through JPA
7.4 Summary
8 Transactions and containers
8.1 Undoing work
8.2 Transactions
8.3 Containers
8.4 Summary
9 Blending OSGi and Java EE using JNDI
9.1 Sharing resources
9.2 Understanding Java’s yellow pages
9.3 Establishing the initial context
9.4 Handling object conversions
9.5 Exposing OSGi services in JNDI
9.6 Embedding OSGi
9.7 Summary
OSGi in Depth
10 Remote services and the cloud
10.1 Remote invocation
10.2 Distribution providers
10.3 Dealing with the semantics of distributed systems
10.4 Elasticity at the cloud
10.5 Summary
11 Launching OSGi using start levels
11.1 Managing disorderly bundles
11.2 Layered architecture to managing bundles
11.3 Deploying applications
11.4 Simplifying launching of the framework
11.5 Summary
12 Managing with JMX
12.1 Java’s management API
12.2 Managing bundles
12.3 Managing services
12.4 Managing import and export packages
12.5 Managing an OSGi framework instance
12.6 Management notifications
12.7 Managing bundle configuration
12.8 OSGi JMX patterns
12.9 Summary
13 Putting it all together by extending Blueprint
13.1 Application bundles and their containers
13.2 Declarative assembly using Blueprint
13.3 Extending Blueprint
13.4 Revisiting the auction application
13.5 Summary
13.6 Epilogue
Appendix A OSGi manifest headers

About The Author:
Alexandre Alves is the architect for Oracle CEP, coauthor of the WS-BPEL 2.0 specification, and a member of the steering committee of EP-TS.

More from Author