1 2 3 4 5 Previous Next 67 Replies Latest reply on Apr 4, 2006 7:26 AM by adrian.brock Go to original post
      • 45. Re: JBossRetro weaver issues

        If I revert the ReentrantReadWriteLock to the backport concurrent util version
        rather than Doug Lea's version
        then RetroCheck will catch attempts to use the unsupported methods/classes yes.

        Webservices doesn't use this class, so I don't think it is a high priority to get
        complete coverage on this class just yet?

        • 46. Re: JBossRetro weaver issues

          That's my point. If webservices doesn't use it, we shouldn't spend time ensuring its coverage. But we want a build to fail if they do use it in the future. I think that is what you are suggesting.

          • 47. Re: JBossRetro weaver issues

            I've reverted to backport-concurrent-util and removed the tests that don't have
            coverage.

            This means there is still an issue with the ReentrantLockTest timing out
            when run with the TCK tests.

            • 48. Re: JBossRetro weaver issues

              I'm getting an error when running the check task against latest webservice retro binary:

              [retrocheck] ==== /home/rcampbell/work/jboss-head/webservice/output/classes-retro/org/jboss/ws/tools/helpers/ToolsHelper.class
              [retrocheck] Cannot find method java.lang.Class.getSimpleName()Ljava/lang/String;
              [retrocheck] Cannot find method java.lang.Class.getSimpleName()Ljava/lang/String;
              


              Once this is integrated with the build, we can create a cruisecontrol run for this.

              • 49. Re: JBossRetro weaver issues
                starksm64

                This does not even translate for me with the latests jbossretro contents:

                retrotranslate:
                 [retro] Exception in thread "main" java.lang.NoClassDefFoundError: edu/emory
                /mathcs/backport/java/util/concurrent/helpers/Utils
                 [retro] at org.jboss.ant.tasks.retro.ClassRedirectEditor.<clinit>(ClassR
                edirectEditor.java:58)
                 [retro] at org.jboss.ant.tasks.retro.Weaver.weave(Weaver.java:280)
                 [retro] at org.jboss.ant.tasks.retro.Weaver.main(Weaver.java:107)
                
                BUILD FAILED
                C:\cvs\JBossHead\jboss-head\webservice\build-retro.xml:41: Java returned: 1
                



                • 50. Re: JBossRetro weaver issues
                  starksm64

                  The retrotranslate target does not include the backport-util-concurrent.jar so I don't see how this can be working. I had to change the retro task classpath to include the jbossretrort.classpath:

                   <retro compilerclasspathref="jbossretro.classpath" destdir="${build.classes.retro}">
                   <classpath refid="jbossretrort.classpath"/>
                   <classpath refid="javac.classpath"/>
                   <classpath>
                   <pathelement path="${build.classes}"/>
                   </classpath>
                   <src path="${build.classes}"/>
                   </retro>
                  


                  After that the check is failing with the Class.getSimpleName error. This a new Class method that is missing in the translation. I'll add it.


                  • 51. Re: JBossRetro weaver issues
                    starksm64

                    The check is passing with the latest jbossretro changes.

                    [starksm@banshee9100 webservice]$ ant -buildfile build-retro.xml check
                    Buildfile: build-retro.xml
                    
                    ...
                    
                    check:
                    [retrocheck] Check Successful: 7550 ms
                    



                    • 52. Re: JBossRetro weaver issues

                      The scoped classpool is done.

                      Since I am now pruning the data, I still need to write some tests to check that
                      all the annotations are retained after the prune.

                      The other things to test (not sure how to do it in general) are:

                      * java2Compliance=false classloading

                      * aop generated classes where getResource() will fail
                      Bill has a JBossClassPool class that dumps pages the bytecode out to
                      a temporary file.

                      • 53. Re: JBossRetro weaver issues

                        The other thing to look at is how this data gets garbage collected.
                        I think the AOPClassPool assumes it will get a notification
                        to unregisterClassLoader() via the Translator interface?

                        • 54. Re: JBossRetro weaver issues
                          starksm64

                           

                          "adrian@jboss.org" wrote:
                          The other thing to look at is how this data gets garbage collected.
                          I think the AOPClassPool assumes it will get a notification
                          to unregisterClassLoader() via the Translator interface?

                          Yes, that is what I read when browsing through it and therefore wonder about its utility outside of jbossas. Wouldn't just a WeakHashMap be the suggested approach?


                          • 55. Re: JBossRetro weaver issues

                             

                            "scott.stark@jboss.org" wrote:
                            "adrian@jboss.org" wrote:
                            The other thing to look at is how this data gets garbage collected.
                            I think the AOPClassPool assumes it will get a notification
                            to unregisterClassLoader() via the Translator interface?

                            Yes, that is what I read when browsing through it and therefore wonder about its utility outside of jbossas. Wouldn't just a WeakHashMap be the suggested approach?


                            Yes. I think it that would be a better approack.
                            i.e.Make a version of the SoftValueHashMap that uses a weak reference
                            as the key.

                            • 56. Re: JBossRetro weaver issues

                              The classloader is now held as a weak reference.

                              I've also completed the tests for basic scoped annotations
                              and added support for field and constructor annotations.

                              • 57. Re: JBossRetro weaver issues

                                I am integrating jbossretro into buildmagic and have found a webservice specific problem. Specifically, they copy classes from /server into their build before weaving:

                                <mkdir dir="${build.classes.retro.src}"/>
                                 <copy todir="${build.classes.retro.src}">
                                 <fileset dir="${build.classes}">
                                 <include name="javax/**"/>
                                 <include name="org/jboss/ws/**"/>
                                 </fileset>
                                 <fileset dir="${jboss.server.root}/classes">
                                 <include name="org/jboss/webservice/metadata/**"/>
                                 </fileset>
                                 </copy>


                                So that when it comes time to weave, jbossretro doesn't weave the classes it finds in jboss.jar:

                                [retro] [warning] Trying to compile /home/rcampbell/work/jboss-head/webservice/output/classes14/org/jboss/webservice/metadata/jaxrpcmapping/PackageMapping.class and found it also within file:/home/rcampbell/work/jboss-head/server/output/lib/jboss.jar!/org/jboss/webservice/metadata/jaxrpcmapping/PackageMapping.class will not proceed.
                                 [retro] [warning] Trying to compile /home/rcampbell/work/jboss-head/webservice/output/classes14/org/jboss/webservice/metadata/jaxrpcmapping/ServiceInterfaceMapping.class and found it also within file:/home/rcampbell/work/jboss-head/server/output/lib/jboss.jar!/org/jboss/webservice/metadata/jaxrpcmapping/ServiceInterfaceMapping.class will not proceed.


                                Can this check be disabled? I'm passing the javac.classpath to the jbossretro task. I guess I could prune this manually, but this seems worse.



                                • 58. Re: JBossRetro weaver issues

                                  I went ahead and checked this in. You can run it with

                                  cd webservices; ant clean main -Dretro=true



                                  • 59. Re: JBossRetro weaver issues

                                     

                                    "ryan.campbell@jboss.com" wrote:
                                    Can this check be disabled? I'm passing the javac.classpath to the jbossretro task. I guess I could prune this manually, but this seems worse.


                                    This check was inherited from aopc,
                                    I am not sure what purpose it serves or what will happen if it is removed?

                                    You'd have to ask Bill Burke.