1 2 Previous Next 18 Replies Latest reply on Jul 14, 2009 10:56 AM by flavia.rainone Go to original post
      • 15. Re: ClassPool for JBoss Reflection
        flavia.rainone

        Kabir,

        On AS5, I see that the JBoss5ClassPoolFactory is the default factory used if there is no class pool defined.
        At Branch5_x. I see that the classpool factory is defined as JBossClDelegatingClassPoolFactory. So, is JBoss5CPF ever used?

        Another question, I didn't get what is TempClassPool for (except for the convert references part) and when is it used.

        • 16. Re: ClassPool for JBoss Reflection
          flavia.rainone

           

          "alesj" wrote:
          Yes, I agree with Kabir.

          The Reflect should be CL impl agnostic.
          You can simply create new CLPool project in jbossas/projects.
          Which should also be properly structured - base spi, jboss-cl impl, ...
          Where Reflect should then just consume minimal spi, everything else is impl detail depending on the env we're running in.


          Before creating this project... Will be there a need for a StandaloneClassPool, Kabir? I don't think so, but I would like to confirm. If the class pools are tied in to JBoss, I'll create a jboss-classpool project, so we can make clear that it is jboss as-related only.

          • 17. Re: ClassPool for JBoss Reflection
            kabirkhan

             

            "flavia.rainone@jboss.com" wrote:

            On AS5, I see that the JBoss5ClassPoolFactory is the default factory used if there is no class pool defined.
            At Branch5_x. I see that the classpool factory is defined as JBossClDelegatingClassPoolFactory. So, is JBoss5CPF ever used?

            JBoss5CPF is the old class pool factory that was used before the new XXXXDelegatingClassPools.

            "flavia.rainone@jboss.com" wrote:

            Another question, I didn't get what is TempClassPool for (except for the convert references part) and when is it used.

            Do you mean this:
             protected boolean convertReferences(CtClass clazz, ClassAdvisor clazzAdvisor) throws Exception
             {
             boolean converted = false;
             String ref = null;
             try
             {
             AOPClassPool pool = AOPClassPool.createAOPClassPool(clazz.getClassPool(), AOPClassPoolRepository.getInstance());
            

            It is something I've always assumed was there for a reason and taken for granted since it has been there since before my time. However, all that seems to do is to delegate to the parent classpool so maybe it can be removed and clazz.getClassPool() can be used?

            "flavia.rainone@jboss.com" wrote:

            Before creating this project... Will be there a need for a StandaloneClassPool, Kabir? I don't think so, but I would like to confirm. If the class pools are tied in to JBoss, I'll create a jboss-classpool project, so we can make clear that it is jboss as-related only.

            It looks like StandaloneClassPool(Factory) is used when run standalone, i.e. in the testsuite. But that can maybe live in AOP?

            • 18. Re: ClassPool for JBoss Reflection
              flavia.rainone

               

              "Kabir" wrote:
              Do you mean this:
               protected boolean convertReferences(CtClass clazz, ClassAdvisor clazzAdvisor) throws Exception
               {
               boolean converted = false;
               String ref = null;
               try
               {
               AOPClassPool pool = AOPClassPool.createAOPClassPool(clazz.getClassPool(), AOPClassPoolRepository.getInstance());
              

              It is something I've always assumed was there for a reason and taken for granted since it has been there since before my time. However, all that seems to do is to delegate to the parent classpool so maybe it can be removed and clazz.getClassPool() can be used?

              I'll test that and see what happens.

              "Kabir" wrote:

              It looks like StandaloneClassPool(Factory) is used when run standalone, i.e. in the testsuite. But that can maybe live in AOP?

              Yes, that's what I'm thinking. The whole point here is that if JBoss Reflection is used with a standalone application, the javassist ClassPool can be used.

              1 2 Previous Next