2 Replies Latest reply on May 7, 2007 8:34 AM by Adrian Brock

    Ideas for JBoss Retro

    Paul Gier Master

      I have a couple ideas for changes to JBoss Retro.

      First, I'd like to move non ant specific stuff out of the ant.tasks package, so the command line interface part of Weaver would be moved to something like:

      org.jboss.retro.cli

      And other non-ant stuff would be moved into more appropriate packages.

      Next, I'd like to move all runtime stuff into it's own package.
      So for example
      org.jboss.lang
      org.jboss.util
      

      Would be moved to
      org.jboss.retro.runtime.lang
      org.jboss.retro.runtime.util
      

      This way the separation between weaver and runtime is a little easier to see.

      Taking this a step further, I was thinking that these might be divided into:
      org.jboss.retro.runtime.jdk14
      and
      org.jboss.retro.runtime.jdk15

      This way, in the future, retro could support conversions from JSE 6 to 1.5 and/or 6 to 1.4. A conversion from 6 to 1.5 would only need to use classes from the jdk1.5 runtime.

      The last part is going to be more difficult and if it sounds like a bad idea, please let me know. I'd like to modify the current ClassRedirectEditor to be more dynamic. When the Weaver starts up, I would like it to build a map containing all of the classes and methods in the new runtime package (org.jboss.retro.runtime.jdk14). Then the modified ClassRedirectEditor will search for all methods matching something in the map. If it exists in the map, then just replace the jdk5 method with the jboss version.

      So for example, if the ClassRedirectEditor finds a method like java.lang.Boolean.parseBoolean it will replace the call with the matching method org.jboss.retro.runtime.jdk14.Boolean.parseBoolean.

      My plan is to start working on these changes after the SVN conversion, so that the folder changes are tracked.



        • 1. Re: Ideas for JBoss Retro
          Adrian Brock Master

           

          "pgier" wrote:

          The last part is going to be more difficult and if it sounds like a bad idea, please let me know. I'd like to modify the current ClassRedirectEditor to be more dynamic.


          As we've discussed many times before.

          The JBossRetro task is just a simple port of aopc
          that provides an ant task on top of Javassist expression editors (and some other things).

          JBossRetro should be:
          1) A generic mechanism to run these expressions from ant (or maven or any other build system)
          2) A runtime support library
          3) Some "factory settings" for (1) that map into (2)
          4) Other tools like Retrocheck

          That makes it very generic (you can provide your own class editing - not just retroing)
          which would also include a framework to implement aopc.

          • 2. Re: Ideas for JBoss Retro
            Adrian Brock Master

            Find other discussions for the details.