1. /*
  2. * @(#)ORBClassLoader.java 1.3 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.internal.orbutil;
  8. /**
  9. * Based on feedback from bug report 4452016, all class loading
  10. * in the ORB is isolated here. It is acceptable to use
  11. * Class.forName only when one is certain that the desired class
  12. * should come from the core JDK.
  13. */
  14. public class ORBClassLoader
  15. {
  16. public static Class loadClass(String className)
  17. throws ClassNotFoundException
  18. {
  19. return ORBClassLoader.getClassLoader().loadClass(className);
  20. }
  21. public static ClassLoader getClassLoader() {
  22. if (Thread.currentThread().getContextClassLoader() != null)
  23. return Thread.currentThread().getContextClassLoader();
  24. else
  25. return ClassLoader.getSystemClassLoader();
  26. }
  27. }