Java Reference
In-Depth Information
Let's see this extender in action:
$ cd chapter06/jEdit-example
$ ant jEdit.patch dist
$ java -Djedit.home=jEdit -jar launcher.jar jEdit
-> install file:test/Calculator.jar
Look in the Plugins menu; no plugins should be available. Now start the calculator
bundle that you just installed:
-> start 9
You should see the calculator in the Plugins menu. Selecting this item opens the win-
dow shown in figure 6.11. If you stop the calculator bundle, this window immediately
disappears, and the Plugins menu once again shows no available plugins:
-> stop 9
Cool—the extender successfully bridges the gap between OSG i bundles and jEdit plug-
ins! You can now use existing OSG i management agents, such as the Apache Felix Web
Console ( http://felix.apache.org/site/apache-felix-web-console.html ) , to manage
jEdit plugins. This small example shows how standards like OSG i can make it much eas-
ier to reuse and assemble existing pieces into new applications.
Are you eager to start moving your application to OSG i? Wait, not so fast! We have
one last topic to discuss before we close out this chapter, and it's something you
should keep asking yourself when you're modularizing applications: is this bundle
adding any value?
Figure 6.11
jEdit calculator plugin
 
Search WWH ::




Custom Search