glassfish
  1. glassfish
  2. GLASSFISH-3197

EJBException duplicate cause field not required since 1.4

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 9.1pe
    • Fix Version/s: 9.1pe
    • Component/s: ejb_container
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      3,197
    • Status Whiteboard:
      Hide

      as91-na, as91ur1-na

      Show
      as91-na, as91ur1-na

      Description

      Since JDK 1.4, there is a getCause that return the root cause on any Thowable,
      EJBException got a getCausedByException that also return root cause ! Same use
      according to docs but using two separate fields.

      IMHO, the Java EE spec has to be clear that on 1.4+ VM the EJBException
      CausedByException is the same thing as the Cause !

      This means simply removing the causeException field and replacing this by the
      cause field inherited from Throwable and in constructors call the parent
      constructor with the cause parameter filed !

      Doing so, will avoid initialisation problem and ease exception untacking (no
      special tratment for EJBException is required).

      If fine with the GF team, this has to be discussed with the spec group as well
      for spec sync-ing.

        Activity

        Hide
        Mahesh Kannan added a comment -

        This is not a beta showstopper. Downgrading this to a P3.

        Show
        Mahesh Kannan added a comment - This is not a beta showstopper. Downgrading this to a P3.
        Hide
        gfbugbridge added a comment -

        <BT6570399>

        Show
        gfbugbridge added a comment - <BT6570399>
        Hide
        Mahesh Kannan added a comment -

        getCausedByException() was introduced in J2EE1.3 itself.

        Talked to Ken Saks about this. We will do a cleanup of EJBException in 3.1. For
        now downgrading this to a P4. Will bump it back to a P3 after FCS

        Show
        Mahesh Kannan added a comment - getCausedByException() was introduced in J2EE1.3 itself. Talked to Ken Saks about this. We will do a cleanup of EJBException in 3.1. For now downgrading this to a P4. Will bump it back to a P3 after FCS
        Hide
        bjb added a comment -

        Congrats for GF v2 ! Now, let's see if you can solve this one. This would realy
        help for people debugging EJB related stuffs.

        Quote from http://java.sun.com/javase/6/docs/api/java/lang/Throwable.html

        "
        Prior to release 1.4, there were many throwables that had their own non-standard
        exception chaining mechanisms ( ExceptionInInitializerError,
        ClassNotFoundException, UndeclaredThrowableException, InvocationTargetException,
        WriteAbortedException, PrivilegedActionException, PrinterIOException,
        RemoteException and NamingException). All of these throwables have been
        retrofitted to use the standard exception chaining mechanism, while continuing
        to implement their "legacy" chaining mechanisms for compatibility.

        Further, as of release 1.4, many general purpose Throwable classes (for example
        Exception, RuntimeException, Error) have been retrofitted with constructors that
        take a cause. This was not strictly necessary, due to the existence of the
        initCause method, but it is more convenient and expressive to delegate to a
        constructor that takes a cause.

        By convention, class Throwable and its subclasses have two constructors, one
        that takes no arguments and one that takes a String argument that can be used to
        produce a detail message. Further, those subclasses that might likely have a
        cause associated with them should have two more constructors, one that takes a
        Throwable (the cause), and one that takes a String (the detail message) and a
        Throwable (the cause).
        "

        I do think EJBException fall into this category as well

        Rgs,
        JB

        Show
        bjb added a comment - Congrats for GF v2 ! Now, let's see if you can solve this one. This would realy help for people debugging EJB related stuffs. Quote from http://java.sun.com/javase/6/docs/api/java/lang/Throwable.html " Prior to release 1.4, there were many throwables that had their own non-standard exception chaining mechanisms ( ExceptionInInitializerError, ClassNotFoundException, UndeclaredThrowableException, InvocationTargetException, WriteAbortedException, PrivilegedActionException, PrinterIOException, RemoteException and NamingException). All of these throwables have been retrofitted to use the standard exception chaining mechanism, while continuing to implement their "legacy" chaining mechanisms for compatibility. Further, as of release 1.4, many general purpose Throwable classes (for example Exception, RuntimeException, Error) have been retrofitted with constructors that take a cause. This was not strictly necessary, due to the existence of the initCause method, but it is more convenient and expressive to delegate to a constructor that takes a cause. By convention, class Throwable and its subclasses have two constructors, one that takes no arguments and one that takes a String argument that can be used to produce a detail message. Further, those subclasses that might likely have a cause associated with them should have two more constructors, one that takes a Throwable (the cause), and one that takes a String (the detail message) and a Throwable (the cause). " I do think EJBException fall into this category as well Rgs, JB
        Hide
        Mahesh Kannan added a comment -

        We will do a cleanup of EJBException in 3.1. For 91 UR1, this is not a show stopper

        Show
        Mahesh Kannan added a comment - We will do a cleanup of EJBException in 3.1. For 91 UR1, this is not a show stopper
        Hide
        sanandal added a comment -

        "Reclassifying as P4 because this issue is not deemed "must fix" for this v2.1
        release whose primary release driver is SailFin.
        This issue will be scrubbed after this release and will be given the right
        priority for the next release."

        Show
        sanandal added a comment - "Reclassifying as P4 because this issue is not deemed "must fix" for this v2.1 release whose primary release driver is SailFin. This issue will be scrubbed after this release and will be given the right priority for the next release."
        Hide
        ksak added a comment -

        Reassigning bugs from Mahesh

        Show
        ksak added a comment - Reassigning bugs from Mahesh
        Hide
        ksak added a comment -

        Duplicate of 6963.

            • This issue has been marked as a duplicate of 6963 ***
        Show
        ksak added a comment - Duplicate of 6963. This issue has been marked as a duplicate of 6963 ***

          People

          • Assignee:
            ksak
            Reporter:
            bjb
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: