I need to do the dynamic loading of features for my
JBoss web-app without recompiling or redeploying application. The features is a classes with executeLogic() methods which extends Basic Classes of my web-app. The idea is to allow other developer to add features to my server using small features.jar lib for that(which contains basic classes). The features.lib is in WEB-INF\lib of web-app. What I've done is create 'features' dir in jboss deploy dir and put all these feature classes there.
When request arrives I look up at this dir, get jar-files URLS and put them in URLClassLoader. The problem is that the feature classes is loaded with my classloader (which extends URLClassLoader) and basic classes (super classes for feature classes) loaded with org.jboss.mx.loading.UnifiedClassLoader3. That is why I can not cast FeatureClass to BasicFeatureClass. What can I do?