View Javadoc
1   package org.kuali.rice.ksb.server;
2   
3   import org.kuali.rice.core.api.util.ShadowingInstrumentableClassLoader;
4   import org.kuali.rice.ksb.messaging.remotedservices.ServiceCallInformationHolder;
5   
6   /**
7    * A classloader used for KSB test clients.
8    *
9    * @author Kuali Rice Team (rice.collab@kuali.org)
10   */
11  public class KsbTestClientClassLoader extends ShadowingInstrumentableClassLoader {
12  
13      public KsbTestClientClassLoader() {
14          super(KsbTestClientClassLoader.class.getClassLoader());
15          excludeClass(ServiceCallInformationHolder.class.getName());
16      }
17  
18      @Override
19      protected boolean isExcluded(String className) {
20          // by default, this classloader excludes org.eclipse which causes us issues with JPA, of course!
21          if (className.startsWith("org.eclipse")) {
22              return false;
23          }
24          // in order for jax-rs and Apache CXF to work properly when you are running multiple instances of CXF on the
25          // same JVM but different classloaders, we must not defer to the parent classloader for anything
26          // under javax.ws.rs.* packages
27          if (className.startsWith("javax.ws.rs.")) {
28              return false;
29          }
30          return super.isExcluded(className);
31      }
32  
33  }