By John 'Jb' Brock-Oracle on Jul 26, 2010
With the release of JDeveloper 11gR2, the entire Extension Framework has been reworked so that extensions are now implemented as OSGi modules. Extensions written for previous versions of JDeveloper will not work with this release until you do some modifications to your code.
What does this mean to extension developers?
The biggest impact is when and how an extension is loaded. Jdeveloper use to load all extensions at the same time when JDeveloper was first started. We now take advantage of something called Lazy Loading. Extensions are only loaded when the developer needs them. This allows JDeveloper to have a much faster startup time, and also a lower memory footprint while running since extensions that you don't need, are not loaded.
With this release, there is the introduction of Trigger-Hooks in the extension.xml file. This is separate from the older Hooks element. Because an extension isn't loaded automatically by calling the Addin.initialize() method any longer, you need to add an action or event to the trigger-hooks section so the IDE knows when to load your extension.
You can take a look at the trigger-hooks wiki to see the existing trigger-hooks available in this release.
With the use of OSGi, comes the use of a separate classloader for each extension. You may have to change how your extension sets it's dependencies. The classpath element in extension.xml is no longer used. You set the dependencies in the Manfest.MF files instead.
Run and Debug from the IDE
There is an extra step now for running or debugging your extension from within the IDE. Before you click on the Run Extension or Debug Extension options, you must click on "Deploy to Target Platform" first. This rebuilds the Manifest.MF files with any changes to your project. This will become a little smoother in a future release, but for now, you just have to do this one extra step.
JDeveloper Extension Development Guide
With such a significant change to the framework, we had to update the documentation to go with it of course. A completely new Extension Developer Guide has been written for this release. It's a great place to start.
Those are the major changes for the Extension Framework in this release. They are quite significant. I will be posting another entry shortly where I will walk through the steps of taking an existing extension project, and migrating it to work with the new OSGi enabled framework. Stay tuned for more.
As always, please feel free to post any questions or personal experiences in the comments. I'm sure everyone's experiences with migrating existing extensions will be of benefit to all of us.