File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes Design a Plugin based system Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Design a Plugin based system" Watch "Design a Plugin based system" New topic
Author

Design a Plugin based system

Cainiao Zou
Ranch Hand

Joined: Mar 03, 2009
Posts: 36
Hi everybody.

I'm trying to make a plugin-based application which means, besides the basic framework, other functionalities should be added with a plugin style.

The majar problem of such system, i think, is how to load new plugins at the runtime. I don't want to recomplie the whole project when a new plugin installed. Just like Eclipse, after new installation of plugin, the user only need to restart it.
So my first idea about that is using java reflection to load the class at the runtime. there might be some plugin configuration files, the system reads them and load the plugin classes with reflection. Maybe i can use the spring framework as well, because its Inversion of Control is just match my request.

Another idea i'm investigating is using the ejb container. when the plugins are ejbs, i can just pack them into jar and deploy them in an ejb container, then i can use jndi to access them. but it only works when the plugin are ejbs.

anyway, i'm a rookie in system design. so i post this topic and want to hear of your opinions.
btw. is there any good book about system design you want to recommand?

thanks alot in advance!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42926
    
  68
The low-end, not production-ready, but possibly sufficient, approach: http://www.javaranch.com/journal/200607/Journal200607.jsp#a1

The high-end approach: OSGi, possibly as implemented using something like Apache Karaf.
 
wood burning stoves
 
subject: Design a Plugin based system