0 Replies Latest reply on Jul 6, 2005 12:47 AM by Carson Battlelite

    Singleton to be used by EJB and Servlet - classloader dramas

    Carson Battlelite Newbie

      I have a singleton that is used by the client (we have two flavours Swing and Servlet) and the server. When the classes are loaded by different JVMs (e.g. Swing client JVM and JBoss JVM) everything works fine. When we run in JBoss, the Servlet and EJBs are in the same JVM so trying to split the classloaders means that even though I can get two instances (one for server and one for client) other classes loaded by a shared classloader fail to see the singleton (of course, as they can't see back up the classloader hierachy). If I attempt to put all classes in each split classloader I get ClassCastExceptions on the EJBs because I am in the same JVM.

      Is there a way out of this?

      JBoss 3.2.5, JDK 1.3.1_02

      Deploys fine in iPAS.

      I take it you know what splitting the classloaders means i.e. UseJBossWebLoader = false
      combined with
      Isolated = true
      CallByValue = true