Chapter 7. The persistence bundle
This chapter covers
As you’ve learned, OSGi applications are part of a larger ecosystem and constantly need to engage with other applications and deal with external components. In the previous chapter, you learned how to interact with diverse components by publishing and subscribing to application and business events. In this chapter, we’ll investigate other means of collaboration, specifically how to access external (business) data by reading and writing data to and from persistent storage.
The persistence of data is a common theme for most enterprise-grade applications because they must not lose data, particularly enterprise data, which may contain their client’s transactions. For example, recall from section 6.4.1 that one of the issues of the Event Admin service is that it may lose events. One way to avoid this would be for the Event Admin implementation to store the events into some durable media as the events arrive.