0

I do have one EAR with one WAR within. Within this WAR in the WEB-INF/lib folder I do have a list of lib jars. Some of this lib jars are own code and a kind of plugin. This plugins extend the WAR by new features. The plugins are automatically detected with CDI features.

All works fine so long. But the more work I spend to this plugins, the more I would like to have some common code for multiple plugins which is NOT part of the normal EAR/WAR common code. Also I would like to have different versions of this plugins (with different versions of this common plugin code).

My idea is, to have one specific class loader for each of this plugins. This class loader should FIRST try to load from this plugin JAR. If the class/resource is not found within this JAR, the normal class loader of the EAR is asked for.

Are there any solutions for this idea? Can I define a special class loader for one JAR? Or is the idea bad and you do have a better suggestion?

Environment:

  • JBoss 7.1.1
  • JDK 1.6
4

0 に答える 0