2 Replies Latest reply on Apr 25, 2002 6:00 AM by alarik

    Question re: redeploy of class files

    alarik

      Hi --

      I have kind of a basic question about what happens when you redeploy some class files in JBoss 3.0. Specifically, what happens to:

      -- Any static variables from the old class?
      -- Any instances of the class referenced (possibly as static variables) by other classes?
      -- What if there is some code executing in that class (or a class that depends on that class) when it reloads?

      Sorry if these are basic questions, but I couldn't find the answers in the forums, and I just want to make sure that I understand what appears to be a very powerful feature of JBoss 3.

      Thanks,

      Alarik

        • 1. Re: Question re: redeploy of class files
          alarik

          Oh, and one more question:

          -- what happens if you only re-deploy a class which is a super class of a file from another archive?

          Thanks,

          Alarik

          • 2. Re: Question re: redeploy of class files
            alarik

            There's nothing like insomnia to spur you on to writing simple test cases. For the benefit of anyone who might be doing a similar search on these forums in the future:

            each jar loads it's own version of a class, even if it comes out of another jar. so if you have class A in jar a.jar, which references class B in b.jar, and then you change B in b.jar and redeploy it, A's notion of what B is (including method signature, static variables, where it falls in inheritence trees, etc.) remains unchanged, until you redeploy a.jar, which you could do by simply "touch"ing it. At that point, it reloads all the classes from scratch.

            Alarik