6 Replies Latest reply on Sep 8, 2009 9:08 AM by thammoud

    Excessive ClassLoading when calling an EJB

    thammoud

      Hello,

      We are using AS5.1 with JDK1.6. The following stack trace shows up whenever we dump the server stack.

       at java.lang.Class.forName(Class.java:247)
       at org.jboss.classloader.plugins.loader.ClassLoaderToLoaderAdapter.loadClass(ClassLoaderToLoaderAdapter.java:172)
       at org.jboss.classloader.spi.ClassLoaderDomain.loadClassFromParent(ClassLoaderDomain.java:352)
       at org.jboss.classloader.spi.ClassLoaderDomain.loadClassBefore(ClassLoaderDomain.java:307)
       at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:251)
       at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1119)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:798)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)
       - locked org.jboss.classloader.spi.base.BaseClassLoader@a842913
       at java.lang.ClassLoader.loadClass(ClassLoader.java:300)
       - locked org.jboss.ejb3.common.classloader.PrimitiveAwareClassLoader@3d6e45ee
       at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
       at org.jboss.ejb3.common.lang.SerializableMethod.getClassFromName(SerializableMethod.java:307)
       at org.jboss.ejb3.common.lang.SerializableMethod.toMethod(SerializableMethod.java:239)
       at org.jboss.ejb3.session.SessionSpecContainer.isHomeMethod(SessionSpecContainer.java:461)
       at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:153)
       at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:216)
       at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
       at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
       at $Proxy743.findInstrument(Unknown Source)
       at com.enfusion.fas.providers.instrument.InstrumentDataSource.getFinancialInstrument(InstrumentDataSource.java:281)
      
      



      We are using the same cached EJB reference. This method is called many times in a real time environment. Is there a reason why this is happening? This was no issue with 4.x. Thanks for any pointers.



        • 1. Re: Excessive ClassLoading when calling an EJB
          jaikiran

          Co-incidentally, we have been looking into this here https://jira.jboss.org/jira/browse/EJBTHREE-1909. Ideally, the jboss-cl (classloader) should just return back a cached instance, in no time so this should not cause much contention. We will keep that JIRA updated with the details. Thanks for bringing this up.

          • 2. Re: Excessive ClassLoading when calling an EJB
            thammoud

            Thanks for your prompt reply. I looked at the issue n question and got dizzy by the dependencies attached to that problem ticket. Do you have any estimate on when this issue will be resolved? We are in the process of moving our platform to 5.1x and this is a showstopper for us. Again, thanks for the your prompt answer. Keep up the great work.

            • 3. Re: Excessive ClassLoading when calling an EJB
              jaikiran

               

              "thammoud" wrote:
              Do you have any estimate on when this issue will be resolved?


              We are working on it to fix it in a proper way. Right now there are no estimates.

              "thammoud" wrote:

              We are in the process of moving our platform to 5.1x and this is a showstopper for us.


              Out of curiosity - how is this a showstopper? :) We agree that it needs to be fixed, but how is this stopping the app from being used in 5.1.x? Could you provide more details about what kind of application you are deploying?

              • 4. Re: Excessive ClassLoading when calling an EJB
                wolfc

                 

                "thammoud" wrote:
                Thanks for your prompt reply. I looked at the issue n question and got dizzy by the dependencies attached to that problem ticket. Do you have any estimate on when this issue will be resolved? We are in the process of moving our platform to 5.1x and this is a showstopper for us. Again, thanks for the your prompt answer. Keep up the great work.

                EJBTHREE-1909 has been rejected. An alternative https://jira.jboss.org/jira/browse/EJBTHREE-1910 has been substituted.

                If you want estimates and this is a showstopper for you please contact support http://www.jboss.com/services/subscriptions/. For this one you can use your EAP 4 subscription to file the AS 5.1 case. Just tell support I told you so. :-)

                • 5. Re: Excessive ClassLoading when calling an EJB
                  thammoud

                   


                  Out of curiosity - how is this a showstopper?


                  That is your very nice way of saying what the heck are you doing calling the EJB that many times? :)

                  Ok. Ok. I did a quick re-factor to eliminate that and we are all good in this major instance. Thanks for your help.

                  • 6. Re: Excessive ClassLoading when calling an EJB
                    thammoud

                     


                    EJBTHREE-1909 has been rejected. An alternative https://jira.jboss.org/jira/browse/EJBTHREE-1910 has been substituted.

                    If you want estimates and this is a showstopper for you please contact support http://www.jboss.com/services/subscriptions/ . For this one you can use your EAP 4 subscription to file the AS 5.1 case. Just tell support I told you so. :-)


                    Looking at 1910, it looks like it will not be applied to 5.1. Is that correct? Someone will have to use their support contract if they have it to open one? Can I just open a JIRA ticket without a support contract? I just misunderstood the quote above. Thanks for your help.