users@glassfish.java.net

Re: Adding code dynamically

From: <glassfish_at_javadesktop.org>
Date: Tue, 04 Mar 2008 07:43:51 PST

You could use the OSGi framework to dynamically plug in such extensions. OSGi "modules" (called bundles) are JAR files and can by dynamically loaded, updated and unloaded. It's not too difficult to embed such a framework in you application either. As an example of that, check out this piece of documentation on embedding Apache Felix (one of the open source implementations that exist):

http://felix.apache.org/site/launching-and-embedding-apache-felix.html

If you want to learn a bit more about how to maintain a kind of table of your processing types, check out this demonstration which discusses two models (the classical OSGi service model and the extender model) for doing so:

http://felix.apache.org/site/apache-felix-application-demonstration.html

Greetings, Marcel
[Message sent by forum member 'marrs' (marrs)]

http://forums.java.net/jive/thread.jspa?messageID=262196