Chapter 21. Dynamic Best Practices

Applications are often dynamic. New functionality is added, old functionality is removed, but the system keeps running. Even if your system is not inherently dynamic in its steady state, it is dynamic at startup and shutdown. Without the ability to handle the incremental addition of collaborators, you have to manually ensure that all prerequisite elements—services, extensions, listeners—are available before they are needed. Managing start order is frustrating, cumbersome, and brittle.

We have seen dynamic behavior and mechanisms throughout the Toast example. OSGi services, Service Trackers, and SAT, discussed in Chapter 6, “Dynamic Services,” help considerably. Declarative Services, as discussed in Chapter ...

Get OSGi and Equinox now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.