0 Replies Latest reply on Mar 9, 2004 10:37 AM by Darin Jolly

    Dynamic classloading with JBossRMIClassLoader

    Darin Jolly Newbie

      I have three instances of Jboss (dev, test, qa) running varying stages of my application. I'm writing a webapp in which I want to dynamically select one of those environments and, using reflection, invoke an EJB from that environment. Because none of the three environments are actually in this webapp's classpath, the JBossRMIClassLoader (which gets used during the initialContext.lookup() method) doesn't know anything about my specific home interface, so I get ClassNotFoundException on my.ejbHome.

      I've tried sub-classing JBossRMIClassLoader so that I can load those classes, but MyJBossRMIClassLoader gets loaded only once - at startup, so I lose the ability to dynamically pick an environment.

      Is this possible to do?

      Thanks in advance,
      Darin