1 Reply Latest reply on Mar 17, 2003 7:27 PM by fred

    Static variables within webapps

    djolly

      Two different webapps contain copies of the same class (which contains a static variable) - both deployed in the same instance of JBOSS...

      If webappA sets it's instance of this static variable to "a", and then webappB set it's instance to "b", should webappA's instance now be set to "b"?

      This is the behavior I'm seeing. How can I get around this?

      Thank you.

        • 1. Re: Static variables within webapps
          fred

          This occurs because of a shared unified classloader. The webapps can load classes independently by specifying a scoped classloader in jboss-app.xml. Cf. the JBoss Admin book or search this forum.