0 Replies Latest reply on Apr 16, 2010 11:26 AM by Kabir Khan

    JBoss Reflect and javassist status

    Kabir Khan Master

      In case the volcanic ashes clear and the planes work on Tuesday so I can go on holidays, here is the current status of the jboss-reflect on javassist implementation.


      The javassist implementation is feature complete as far as I know, we are just waiting for javassist 3.12.0 before we can do a release.
      I created a branch to test it in AS: https://svn.jboss.org/repos/jbossas/branches/KABIR_JAVASSIST_REFLECT/ and a Hudson run using that branch at http://hudson.qa.jboss.com/hudson/view/JBoss%20AS/job/JBoss-AS-6.0.x-testSuite-sun16-KABIR-REFLECT-JAVASSIST/. There seem to be no major differences between the test runs, although that is hard to say due to timeout issues on Hudson, and AS trunk's number of failures changing. Once AS 6.0.0-M3 is out, it might be an idea to delete and recreate the branch off M3 since we then know for sure that trunk completed with 0 failures. The differences between the branch's component-matrix/pom.xml and the one in trunk are:
      -    <version.javassist>3.11.0.GA</version.javassist>
      +    <version.javassist>3.12.0-SNAPSHOT</version.javassist>
      -    <version.org.jboss.man>2.1.1.SP1</version.org.jboss.man>
      +    <version.org.jboss.man>2.1.1.SP2</version.org.jboss.man>
      -    <version.org.jboss.reflect>2.2.0.Alpha4</version.org.jboss.reflect>
      +    <version.org.jboss.reflect>2.2.0-SNAPSHOT</version.org.jboss.reflect>
      This has been added to the branches run.sh to make sure javassist is being used by jboss-reflect:
      # Setup JBoss specific properties
      JAVA_OPTS="${JAVA_OPTS:+$JAVA_OPTS -Dprogram.name=$PROGNAME}"
      +JAVA_OPTS="${JAVA_OPTS:+$JAVA_OPTS -Dorg.jboss.reflect.spi.TypeInfoFactory=org.jboss.reflect.plugins.javassist.JavassistTypeInfoFactory}"
      Apart from that everything should be the same. I use svnmerge.py to periodically merge the latest changes from Hudson trunk, to do this download svnmerge.py and then go into your local checkout of the branch and merge using svnmerge.py, e.g:
      $~/svnmerge.py merge
      $svn commit -F svnmerge-commit-message.txt
      Give it time to filter through to anonsvn and then start the Hudson run, I think Flavia already has the admin password. If not ask QA for a password.



      The main thing I am looking at now is making the javassist implementation more performant. This is documented in JBoss Reflect Performance Javassist vs Introspection since using the javassist implementation is currently slower than using the introspection one. I'll let you know where I get in that thread before I leave.



      It just occurred to me that another factor in currently making this slow _could_ be the classpools since we need to look CtClasses up there. I have not measured anything, but it is worth bearing in mind and investigating since it is an extra layer on top of the plain classloading which is used by the introspection implementation.



      If I can think of anything else I will let you know on this thread before I go away.