OSGi in Depth
Alexandre de Castro Alves
  • December 2011
  • ISBN 9781935182177
  • 392 pages

Gives you a deep understanding of OSGi.

David Bosschaert, Red Hat

OSGi in Depth presents practical techniques for implementing OSGi, including enterprise services such as management, configuration, event handling, and software component models. You'll 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.

About the Technology

OSGi is a mature framework for developing modular Java applications. Because of its unique architecture, you can modify, add, remove, start, and stop parts of an application without taking down the whole system. You get a lot of benefit by mastering the basics, but OSGi really pays off when you dig in a little deeper.

About the book

OSGi in Depth shows Java developers how to develop to the OSGi Service Platform Enterprise specification, an emerging Java-based technology for developing modular enterprise applications.

Table of Contents detailed table of contents




about this book

about the cover illustration

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

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. ummary

13.6. Epilogue

Appendix A: OSGi manifest headers


What's inside

  • Deep dives into modularization, implementation decoupling, and class-loading
  • Practical techniques for using JEE services
  • Customizing OSGi for specific business domains

About the reader

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

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.

placing your order...

Don't refresh or navigate away from the page.
eBook $30.00 $60.00 3 formats + liveBook
OSGi in Depth (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.

FREE domestic shipping on three or more pBooks