Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-1353

EJBContainer.isCallable is doing string comparison using the '==' operator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • AS 5.0.0.CR1
    • AS 5.0.0.Beta3, AS 5.0.0.Beta4
    • core
    • None

      The EJBContainer.isCallable is comparing two method names using the '==' operator instead of using equals().

      private static boolean isCallable(Method method, Method other)
      {
      if ((method.getDeclaringClass().isAssignableFrom(other.getDeclaringClass())) && (method.getName() == other.getName()))
      {

      While it works for certain verions of the Sun JVM due to the fact that both Method object reference the same name string object, it does not work for the IBM JVM.
      One of the results I encountered is that class interceptors are not applied to session beans.

            rhn-engineering-cdewolf Carlo de Wolf
            drorb Dror Bereznitsky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: