concept OSGi framework in category osgi

appears as: OSGi framework, n OSGi framework, The OSGi framework, OSGi frameworks, OSGi frameworks, The OSGi framework
Enterprise OSGi in Action

This is an excerpt from Manning's book Enterprise OSGi in Action.

The coolness isn’t over yet, though, because OSGi gives you something even cooler. The persistence bundle can be rebuilt and dropped into the load directory again without bouncing the OSGi framework. The runtime detects the new code in the load directory and then uses the OSGi API to update the application with the new code without having to restart anything. If you try a second time to buy lots of chocolates, the result is much more reasonable (figure 3.19).

With a few notable exceptions, most of the tools we’ll discuss aren’t specific to enterprise OSGi. This is partly because you don’t necessarily need enterprise tools—the most important thing is support for core OSGi concepts like compile classpath and launching an OSGi framework. A second reason we don’t cover many enterprise OSGi tools is that enterprise OSGi itself is new, and the tools are still catching up!

Figure 9.21. Eclipse allows unit tests to be run in an OSGi framework from within the IDE using a simple menu option. The target platform is used to generate the list of bundles to install in the OSGi framework.
OSGi in Depth

This is an excerpt from Manning's book OSGi in Depth.

The OSGi framework is the core structure of the OSGi Service Platform. It can be seen as a backplane that hosts bundles, possibly containing services. If you consider that a bundle can be an application, then the definition of the OSGi framework is in accordance with our definition of application frameworks. That is to say, the OSGi framework is an example of an application framework.

Right now, we’ll leave the definition of the OSGi framework somewhat loose. Let’s not worry about what exactly bundles and services are. We’ll discuss the framework, its concepts, and its APIs in detail in the next chapters.

We’re now ready to bootstrap and run the OSGi framework with our applications. To do so properly, you’ll learn in this chapter how to launch the OSGi framework with a simpler custom interface, how to deploy your applications in a consistent manner, and finally how to keep the applications up to date and support live plug-ins of extensions.

Listing 11.2. Changing the active start level of the OSGi framework

Even though the bundles are stopped, their persisted state remains set to Active, which means that these bundles will be restarted when the OSGi framework boots up.

OSGi in Action: Creating Modular Applications in Java

This is an excerpt from Manning's book OSGi in Action: Creating Modular Applications in Java.

Figure 1.3. The OSGi Service Platform specification is divided into halves, one for the OSGi framework and one for standard services.

The OSGi framework plays a central role when you create OSGi-based applications, because it’s the application’s execution environment. The OSGi Alliance’s framework specification defines the proper behavior of the framework, which gives you a well-defined API to program against. The specification also enables the creation of multiple implementations of the core framework to give you some freedom of choice; there are a handful of well-known open source projects, such as Apache Felix ( http://felix.apache.org/), Eclipse Equinox (www.eclipse.org/equinox/), and Knopflerfish (www.knopflerfish.org/). This ultimately benefits you, because you aren’t tied to a particular vendor and can program against the behavior defined in the specification. It’s sort of like the reassuring feeling you get by knowing you can go into any McDonald’s anywhere in the world and get the same meal!

We’ve spent a lot of time talking about creating, deploying, and managing bundles and services. Interestingly, you can’t do anything with these unless you have a running OSGi framework. For such an important and necessary topic, we’ve spent very little time discussing how precisely to achieve it. Not only is it necessary, but by learning to launch the framework, you’ll have the ability to create custom launchers tailored to your application’s needs. It even opens up new use cases, where you can use an instance of an OSGi framework inside an existing application or even embedded inside a bundle. Interesting stuff.

In this chapter, you’ll learn everything you need to know about launching the OSGi framework. To help you reach this goal, we’ll dissect the generic bundle launcher you’ve been using to run the book’s examples. You’ll also refactor the paint program to see how to embed a framework instance inside an existing application. Let’s get going.