Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The OSGi framework provides an isolated persistent storage area for each bundle. This area can be manipulated through the usual java.io.File abstraction. Through this interface, a bundle can read and write files and manipulate directories. In listing 7.1, you can see how to use the bundle’s storage area to persist a LoginEvent, which was defined in the previous chapter. As you go through this listing, keep in mind that we’ll look into simpler and more efficient ways of persisting data later on in this chapter.
|
|