[jboss-dev-forums] [Design of JBoss jBPM] - jBPM Classloading

bwand do-not-reply at jboss.com
Tue Feb 26 06:31:31 EST 2008


Hi,
we are using jBPM in conjunction with OSGi on jBoss Appserver and had problems with the classloading of jBPM. So we looked at the Source Code of ClassLoaderUtil.java and found out that you are actually not using the context class loader to for classloading, which was the cause for our problems. For my understanding this is common practice for libraries used in J2EE Environments. There already is a comment in current ClassLoaderUtil implementation stating that class loading could be made configurable:


  |   public static ClassLoader getClassLoader() {
  |     // if this is made configurable, make sure it's done with the
  |     // jvm system properties
  |     // System.getProperty("jbpm.classloader")
  |     //  - 'jbpm'
  |     //  - 'context'
  |     // 
  |     // or something like Thread.currentThread().getContextClassLoader();
  |     return ClassLoaderUtil.class.getClassLoader();
  |   }
  | 
 
We implemented a patch that reflects the proposal of this comment. It enables jBPM to use the context class loader or to plug in a 'custom' classloader whose class name is defined by another system property. Classloading with the current classloader is the default, if no system property is set. We would like to provide this code to the community. Please give me feedback what you think about this.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132127#4132127

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132127



More information about the jboss-dev-forums mailing list