I am trying to create an application based on plugins, which means that in addition to the basic structure, other functions should be added using the plugin style.
The majar problem of such a system, I think, is how to load new plugins at runtime. I do not want to recompile the whole project when a new plugin is installed. Like Eclipse, after a new installation of the plugin, the user only needs to restart it. So my first idea about this is to use java reflection to load the class at runtime. there may be some plugin configuration files, the system reads them and loads the plugin classes with reflection. Perhaps I can use the spring structure, as its inverse of control just matches my query.
Another idea I'm learning is to use an ejb container. when the plugins are ejbs, I can just pack them in a jar and deploy them in an ejb container, then I can use jndi to access them. but it only works when the plugin is ejbs.
Anyway, I'm new to system design. therefore I am writing this topic and want to hear your opinions. By the way. Is there a good book on system design that you want to recommend?
Thanks in advance!
source share