glassfish
  1. glassfish
  2. GLASSFISH-124

Entity life cycle callbacks don't work

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 9.0pe
    • Fix Version/s: 9.0pe
    • Component/s: entity-persistence
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

    • Issuezilla Id:
      124

      Description

      I have a simple entity class with life cycle callback annotations,
      (see attached file) which are never called, at least there is no
      trace of their output in the server log.

      Is the mechanism broken, is there another log file (other than
      server.log), or am I completely off track here?

      The spec. seems pretty clear.

      1. Account.java
        2 kB
        gbrose
      2. MyListener.java
        0.7 kB
        gbrose

        Activity

        Hide
        marina vatkina added a comment -

        Closing as the latest comments seem to indicate that it was a user user

        Show
        marina vatkina added a comment - Closing as the latest comments seem to indicate that it was a user user
        Hide
        tware added a comment -

        Additional fix required to PrivilegedAccess controller to make methods
        accessible prior to invokation.

        Index: PrivilegedAccessController.java
        ===================================================================
        RCS file:
        /cvs/glassfish/entity-persistence/src/java/oracle/toplink/essentials/internal/security/PrivilegedAccessController.java,v
        retrieving revision 1.2
        diff -w -u -b -r1.2 PrivilegedAccessController.java
        — PrivilegedAccessController.java 3 Mar 2006 17:04:17 -0000 1.2
        +++ PrivilegedAccessController.java 27 Mar 2006 19:39:12 -0000
        @@ -554,6 +554,9 @@
        try {
        return AccessController.doPrivileged(new
        PrivilegedExceptionAction() {
        public Object run() throws IllegalAccessException,
        InvocationTargetException {
        + if(!method.isAccessible())

        { + method.setAccessible(true); + }

        return method.invoke(object, parameters);
        }
        });
        @@ -566,6 +569,9 @@
        }
        }
        } else {
        + if(!method.isAccessible())

        { + method.setAccessible(true); + }

        return method.invoke(object, parameters);
        }
        }

        Show
        tware added a comment - Additional fix required to PrivilegedAccess controller to make methods accessible prior to invokation. – Index: PrivilegedAccessController.java =================================================================== RCS file: /cvs/glassfish/entity-persistence/src/java/oracle/toplink/essentials/internal/security/PrivilegedAccessController.java,v retrieving revision 1.2 diff -w -u -b -r1.2 PrivilegedAccessController.java — PrivilegedAccessController.java 3 Mar 2006 17:04:17 -0000 1.2 +++ PrivilegedAccessController.java 27 Mar 2006 19:39:12 -0000 @@ -554,6 +554,9 @@ try { return AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws IllegalAccessException, InvocationTargetException { + if(!method.isAccessible()) { + method.setAccessible(true); + } return method.invoke(object, parameters); } }); @@ -566,6 +569,9 @@ } } } else { + if(!method.isAccessible()) { + method.setAccessible(true); + } return method.invoke(object, parameters); } }
        Hide
        guypelletier added a comment -

        Fix available in next persistence drop.

        Show
        guypelletier added a comment - Fix available in next persistence drop.
        Hide
        tware added a comment -

        Fix checked in

        Show
        tware added a comment - Fix checked in
        Hide
        marina vatkina added a comment -

        Fixed the build #

        Show
        marina vatkina added a comment - Fixed the build #

          People

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

            Dates

            • Created:
              Updated:
              Resolved: