1 Reply Latest reply on Dec 7, 2004 6:38 PM by Scott Stark

    Access to the Unified Class Loader

    fredatwork Newbie

      Hello,

      I would lie to load a class by its name inside some EJB session code.

      Since I never did that, I carefully read the Wiki documents dedicated to class loaders and scoped applications. I realize the classes I want need to be loaded by a JBoss-specific class loader (UnifiedClassLoader).

      However, I'm wondering how I can get access to the class loader of my application. Is the following snippet correct ?

      Class myClass = Thread.currentThread().getContextClassLoader().loadClass("org.example.myClass") ;

      Thanks for your help.