Home > Store > Programming > Java

larger cover

Add To My Wish List

OSGi and Equinox: Creating Highly Modular Java Systems

Register your product to gain access to bonus material or receive a coupon.

  • Description
  • Reviews
  • Sample Content

Product Author Bios

Jeff McAffer co-leads the Eclipse RCP and Equinox OSGi projects, and is CTO and co-founder of EclipseSource. He is one of the architects of the Eclipse Platform and a coauthor of The Eclipse Rich Client Platform (Addison-Wesley) and OSGi and Equinox (Addison-Wesley). He co-leads the RT PMC and is a member of the Eclipse Project PMC, the Tools Project PMC and the Eclipse Foundation Board of Directors and the Eclipse Architecture Council. Jeff is currently interested all aspects of Eclipse components, from developing and building bundles to deploying, installing and ultimately running them. Previous lives include being a Senior Technical Staff Member at IBM, a team lead at Object Technology International covering work in Smalltalk, distributed/parallel OO computing, expert systems, meta-level architectures and a Ph.D. at the University of Tokyo.

Paul VanderLei
is a partner at Band XI International. He has more than 25 years of software engineering experience with an emphasis on object-oriented design and Agile practices. He is well-known for his innovative, yet straightforward, engineering solutions to complex problems. After earning his M.S. in Computer Science from Arizona State University, he joined Object Technology International and worked on a wide range of Smalltalk-based systems. After OTI’s acquisition by IBM, Paul gained more than 10 years of experience developing embedded Java applications and user interfaces for the automotive and medical industry as a founding member of the IBM Embedded Java Enablement Team. He has been using OSGi in commercial applications since 2000 and is a coauthor of OSGi and Equinox (Addison-Wesley), a book on the proper construction of Java applications using OSGi. He lives in Grand Rapids, Michigan, with his wife and four children.

Simon Archer
has more than 16 years of software engineering experience with an emphasis on object-oriented design, Agile practices, and software quality. After earning his B.Sc. in Computer Science from the University of Portsmouth, UK, he worked as a Smalltalk developer at Knowledge System Corporation and later at Object Technology International, which was later acquired by IBM. While at OTI in 2000, Simon began working with and teaching OSGi in areas such as telematics and RFID. Today he works for IBM Rational using OSGi to build collaborative development tools for the Jazz Foundation project.

<>A Hands-On Guide to Equinox and the OSGi Framework

 In OSGI and Equinox: Creating Highly Modular Java™ Systems, three leading experts show developers—for the first time—exactly how to make the most of these breakthrough technologies for building highly modular dynamic systems.


You’ll quickly get started with Eclipse bundle tooling, create your first OSGi-based system, and move rapidly to sophisticated production development. Next, you’ll master best practices and techniques for creating systems with exceptional modularity and maintainability. You’ll learn all about OSGi’s Declarative Services and how to use them to solve a wide variety of real-world problems. Finally, you’ll see everything that you’ve learned implemented in a complete case study project that takes you from early prototype through application delivery.


For every Eclipse developer, regardless of previous experience, this book

  • Combines a complete hands-on tutorial, online sample code at every step, and deep technical dives for working developers
  • Covers the OSGi programming model, component development, OSGi services, Eclipse bundle tooling, server-side Equinox, and much more
  • Offers knowledge, guidance, and best practices for overcoming the complexities of building modular systems
  • Addresses practical issues ranging from integrating third-party code libraries to server-side programming
  • Includes a comprehensive case study that goes beyond prototyping to deliver a fully refined
    and refactored production system
Whatever your application, industry, or problem domain, if you want to build state-of-the-art software systems with OSGi and Equinox, you will find this book to be an essential resource.

Customer Reviews

8 of 8 people found the following review helpful
5.0 out of 5 stars Great book. Good reference for OSGi best practices., June 26, 2010
By 
Daniel Ford (New York USA) - See all my reviews
(REAL NAME)   
Amazon Verified Purchase(What's this?)
This review is from: OSGi and Equinox: Creating Highly Modular Java Systems (Paperback)
Summary: This is a well executed and detailed explanation of how to develop modular Java systems and applications using OSGi and Equinox. It uses the development of an easy to follow example application, called Toast, as the vehicle to explain OSGi theory and practice using Equninox. One of the main themes of the book is the whys and hows of OSGi Declarative Services. In general, it is a good book for OSGi beginners, but familiarity with Eclipse is a perquisite. Advanced developers will find it to be a good resource and example of OSGi best practices.

The writing was clear and well edited; you could tell that it had been through many revisions to get it to its current polished state. The step-by-step instructions for the examples was at the right level for me, with enough detail to get things to work without being overly long. For instance, I find that I quickly get the concept of the example, but then I like to be given the details of what to name things and exactly... Read more
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


10 of 11 people found the following review helpful
5.0 out of 5 stars Absolutely a GEM, April 3, 2010
By 
This review is from: OSGi and Equinox: Creating Highly Modular Java Systems (Paperback)
I've never learned starting with a wizard-generated code and then trying to decipher what it does with the help of authors explainations on that code. Many authors may still believe that, this is the right and concrete way, but it never worked for me. I'm theory oriented. I must have a goal at very early stages, and I want to know answers of all my WHY-questions. Otherwise I'll give up. Actually, I want to write (not to generate) code and have full control on it. Tools are there to easily modify and manage the code, if and only if I completely know and understand the purpose. This book DOES NOT start with wizard code. Further it chooses a very smart starting point. Very likely, a programmer started his eclipse plug-in and RCP adventure as being an eclipse JDT user. Thus, he knows programming java and uses eclipse as IDE, he deploys his applications in jar's etc... And this book takes you to the journey exactly at this point. It starts with ordinary java classes, and converts them to... Read more
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


5 of 5 people found the following review helpful
4.0 out of 5 stars detailed tutorial for OSGi/Equinox, April 11, 2010
By 
This review is from: OSGi and Equinox: Creating Highly Modular Java Systems (Paperback)
"OSGi and Equinox"is the first "Eclipse Series" book I have read. It has three parts.

The first part is an introduction. The brief history shows how OSGI came to be and the benefits. It had excellent visuals to see the concepts being presented.

The second part is an extended tutorial to create the TOAST application from scratch. The tutorial assumes you've never used Eclipse before so it was a bit slow to get started. I would have liked seeing how to create a project/class as an appendix. There were a ton of IDE screenshots so I certainly felt like I was doing the tutorial with the author. That style got a little dry/repetitive; maybe because I wasn't following along on a computer. Many concepts were covered and there were good tips and warnings to the reader. I was a bit puzzled why the tests are using easyMock with Java 5 and Junit 4. I'll be sure to ask the author when he is at JavaRanch the week of April 20th.

The third part is "deep... Read more
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


Share your thoughts with other customers:
 See all 7 customer reviews...

Online Sample Chapter

Introduction to OSGi Concepts

Sample Pages

Download the sample pages (includes Chapter 2 and Index)

Table of Contents

Foreword         xxi

Preface        xxv

Acknowledgments         xxix

About the Authors        xxxiii

 

Part I:  Introduction        1

Chapter 1: OSGi, Equinox, and Eclipse         3

1.1 A Bit of History   3

1.2 Collaboration   4

1.3 Modularity and Freedom of Action   5

1.4 Platforms   7

1.5 Ecosystems   7

1.6 OSGi in Context   8

1.7 OSGi and Equinox in Practice   10

1.8 Summary   11

 

Chapter 2: OSGi Concepts         13

2.1 A Community of Bundles   13

2.2 Why OSGi?   15

2.3 The Anatomy of a Bundle   18

2.4 Modularity   19

2.5 Modular Design Concepts   21

2.6 Lifecycle   22

2.7 Collaboration   24

2.8 The OSGi Framework   26

2.9 Security   27

2.10 OSGi Framework Implementations   27

2.11 Summary   28

 

Part II: OSGi by Example         29

Chapter 3: Tutorial Introduction          31

3.1 What Is Toast?   31

3.2 The Evolution of Toast   34

3.3 Development Environment Installation   36

3.4 Sample Code   36

3.5 Target Platform Setup   39

3.6 Learning by Example   46

3.7 Summary   48

 

Chapter 4: Hello, Toast          49

4.1 A Simple Scenario   49

4.2 Slicing Toast into Bundles   56

4.3 Summary   65

 

Chapter 5: Services         67

5.1 Moving to Services   67

5.2 Registering the GPS Service   69

5.3 Registering the Airbag Service   75

5.4 Acquiring Services   79

5.5 Launching   81

5.6 Troubleshooting   82

5.7 Summary   83

 

Chapter 6: Dynamic Services          85

6.1 Introduction to Dynamic Services   85

6.2 Using Service Trackers   87

6.4 Using Declarative Services   97

6.5 Summary   105

 

Chapter 7: Client/Server Interaction         107

7.1 The Back End   108

7.2 The Client Side   111

7.3 Utility Classes   119

7.4 Running Toast   121

7.5 Summary   123

 

Chapter 8: Testing         125

8.1 Making Toast Testable   126

8.2 Unit-Testing Toast   126

8.3 System-Testing Toast   131

8.4 Summary   139

 

Chapter 9: Packaging          141

9.1 Defining a Toast Product   141

9.2 Exporting Toast   149

9.3 Packaging for Other Platforms   152

9.4 Getting Serious about Component Definition   154

9.5 Summary   158

 

Chapter 10: Pluggable Services          161

10.1 Separating Interface from Implementation   162

10.2 Device Simulation   165

10.3 Simulated Devices as Pluggable Services   167

10.4 Running with Simulated Devices   169

10.5 Summary   171

 

Chapter 11: Extensible User Interface            173

11.1 Crust   173

11.2 Emergency   175

11.3 Climate and Audio   181

11.4 The OSGi Application Model   184

11.5 Navigation and Mapping   187

11.6 Summary   195

 

Chapter 12: Dynamic Configuration         197

12.1 The Tracking Scenario   197

12.2 Installing the Tracking Code   198

12.3 Running the Basic Tracking Scenario   201

12.4 Configuration   201

12.5 Summary   205

 

Chapter 13: Web Portal             207

13.1 Portal   207

13.2 The PortalServlet   208

13.3 Action Lookup Using Services   210

13.4 Declaring a Portal Action   213

13.5 Whiteboard Pros and Cons   215

13.6 Summary   216

 

Chapter 14: System Deployment with p2              217

14.1 Introduction to Equinox p2   217

14.2 Refining the Toast Structure   221

14.3 Writing a Provisioner   229

14.4 Adding a Deployment Web UI   233

14.5 Exporting, Running, and Provisioning   235

14.6 Client-Side Dynamic Deployment   241

14.7 Summary   242

 

Part III: Deep Dives         245

Chapter 15: Declarative Services          247

15.1 The Declarative Services Model   247

15.2 Common Scenarios   248

15.3 Launching and Debugging DS Applications   269

15.4 PDE Tooling   270

15.5 Summary   273

 

Chapter 16: Extensions         275

16.1 The Extension Registry   275

16.2 Extension Points   278

16.3 Extensions   280

16.4 Advanced Extension Topics   281

16.5 Extension Registry Lifecycle   283

16.6 Dynamic Extension Scenarios   284

16.7 Services and Extensions   290

16.8 Extension Registry Myths   293

16.9 Summary   293

 

Chapter 17: Logging          295

17.1 The Log Service Specification   295

17.2 Using the LogService in Toast   298

17.3 Using the LogReaderService   301

17.4 Toast’s LogUtility Class   303

17.5 Equinox’s LogService Implementations   304

17.6 Summary   306

 

Chapter 18: HTTP Support         307

18.1 The HttpService   308

18.2 Registering and Unregistering a Servlet   309

18.3 Declarative HTTP Content Registrations   312

18.4 Using Jetty   313

18.5 HTTP Contexts and JAAS Integration   314

18.6 Troubleshooting   318

18.7 Summary   320

 

Chapter 19: Server Side          321

19.1 Servers and OSGi   322

19.2 Embedding the Back End in a Web Application   323

19.3 Remote Services in OSGi   333

19.4 Summary   341

 

Chapter 20: Release Engineering         343

20.1 What Is PDE Build?   344

20.2 Bundle build.properties 3  45

20.3 Setting Up a Builder   347

20.4 Running the Builder   353

20.5 Tweaking the Build   356

20.6 Building Add-on Features   363

20.7 Building WARs   367

20.8 Summary   367

 

Part IV: Reference         369

Chapter 21: Dynamic Best Practices         371

21.1 Dynamism and You   371

21.2 Dynamic Aspects of Toast   372

21.3 Dynamic Challenges   374

21.4 Dynamic Awareness  374

21.5 The Extender Pattern and BundleTracker   378

21.6 Dynamic Enablement   379

21.7 The Dynamics of Startup and Shutdown   382

21.8 Summary   385

 

Chapter 22: Integrating Code Libraries         387

22.1 JARs as Bundles   388

22.2 Bundling by Injection   388

22.3 Bundling by Wrapping   390

22.4 Bundling by Reference   392

22.5 Bundling Using bnd   394

22.6 Troubleshooting Class Loading Problems   394

22.7 Summary   403

 

Chapter 23: Advanced Topics          405

23.1 The Equinox Console   406

23.2 Roles in OSGi   409

23.3 The Shape of Bundles   411

23.4 Fragments   413

23.5 Singletons   415

23.6 Bundle Lifecycle   416

23.7 Bundle Activation Policy   419

23.8 Controlling Bundle Start   421

23.9 Class Loading   423

23.10 Configuring and Running Equinox   428

23.11 Data Areas   432

23.12 Summary   434

 

Chapter 24: Declarative Services Reference         435

24.1 Component XML Schema v1.1.0   435

24.2 The Component Lifecycle   444

24.3 Summary   457

 

Index         459

 
Best Value

Book + eBook Bundle  $89.98  $53.99

Book Price: $39.99
eBook Price: $14.00

Buy

This book includes free shipping!

Buy

Book  $49.99  $39.99

Usually ships in 24 hours.

This book includes free shipping!

Buy

eBook (Adobe DRM)  $39.99  $31.99

About Adobe DRM eBooks

Information This eBook requires the free Adobe® Digital Editions software.

Before downloading this DRM-encrypted PDF, be sure to:


  • Install the free Adobe Digital Editions software on your machine. Adobe Digital Editions only works on Macintosh and Windows, and requires the Adobe Flash Player. Please see the official system requirements.
  • Authorize your copy of Adobe Digital Editions using your Adobe ID. If you don't already have an Adobe ID, you can create one here.
Purchase Reward: One Month Free Subscription
By completing any purchase on InformIT, you become eligible for an unlimited access one-month subscription to Safari Books Online.

Get access to thousands of books and training videos about technology, professional development and digital media from more than 40 leading publishers, including Addison-Wesley, Prentice Hall, Cisco Press, IBM Press, O'Reilly Media, Wrox, Apress, and many more. If you continue your subscription after your 30-day trial, you can receive 30% off a monthly subscription to the Safari Library for up to 12 months. That's a total savings of $199.