Monday Jul 26, 2010

What's New in JDeveloper 11gR2 Extension Development

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?

Lazy Loading

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.

Trigger Hooks

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.

Separate Classloaders

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.

What's next?

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.




About

profile image
My name is John 'JB' Brock.
This Blog will focus on tips and tricks for working with the JDeveloper Extension SDK.
I hope to bring clarity to some of the mysteries around developing extensions for JDeveloper.


Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today