Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] ServiceExtension loader

David,

In ServiceFactory#aquire(), the extensions of ServiceExtension are loaded. Here is the code that creates the extensions

String className = element.getAttribute("class");

Class servExtClass = getClass().getClassLoader().loadClass(className);
ServiceExtension se = (ServiceExtension)servExtClass.getConstructor(new Class[0]).newInstance(new Object[0]);

My extension is in a different plugin so it wont work for me. I changed the above to:

ServiceExtension se = (ServiceExtension)element.createExecutableExtension("class");

And it works.

Justin

--
Justin Deoliveira
Refractions Research Inc.
jdeolive@xxxxxxxxxxxxxxx
(250) 885-4387


Back to the top