Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2
    • Component/s: Uncategorized
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Sun

    • Issuezilla Id:
      119

      Description

      In my blog at
      http://weblogs.java.net/blog/edburns/archive/2005/08/using_ejb_annot.html
      I put forth the idea that the @PostConstruct and @PreDestroy
      annotations, currently defined in EJB 3, be moved into the new Common
      Annotations JSR-250.

      I have received word that this will be happening in the next couple of
      weeks.

      Let's review the purpose of these annotations.

      @PostConstruct

      • Designates a method to receive a callback during creation of a
      • session bean or message driven bean instance.

      @PreDestroy

      • Designates a method to receive a callback before a session bean or
      • message driven instance is destroyed.

      However, when they move over to JSR-250, they would be generalized to
      say "container managed object".

      PROPOSAL

      Require JSF implementations running in a JSR-250 compliant container to

      1. call any public no argument managed bean methods annotated with
      @PostConstruct be called after the object is instantiated, and after
      any injection is performed, but before the bean is placed into the
      scope.

      2. call any public no argument managed bean methods annotated with
      @PreDestroy be called when the scope in which the bean has been
      placed is ending.

      IMPLEMENTATION

      My blog provided an implementation, currently checked into Sun's JSF
      implementation codebase, but a production implementation would use TLD
      listeners declared in the jsf_core taglib instead of the way I did it in
      the blog. The point is that the user doesn't have to take any action
      other than sticking the annotation on the method.

      1. 119-proposal.txt
        3 kB
        Ed Burns
      2. jsfapi119.tar.gz
        44 kB
        Ed Burns
      3. message.txt
        38 kB
        Ed Burns

        Activity

        Hide
        Ed Burns added a comment -

        Created an attachment (id=64)
        Version 2 of proposal.

        Show
        Ed Burns added a comment - Created an attachment (id=64) Version 2 of proposal.
        Hide
        Ed Burns added a comment -

        Created an attachment (id=65)
        Snaphsot. Feature works. HTMLUnit test ready to be written.

        Show
        Ed Burns added a comment - Created an attachment (id=65) Snaphsot. Feature works. HTMLUnit test ready to be written.
        Hide
        Ed Burns added a comment -

        Created an attachment (id=66)
        change-bundle REVISION 1

        Show
        Ed Burns added a comment - Created an attachment (id=66) change-bundle REVISION 1
        Hide
        Ed Burns added a comment -

        Fix checked in.

        Show
        Ed Burns added a comment - Fix checked in.
        Hide
        Ed Burns added a comment -

        Prepare to delete "spec" subcomponent.

        Show
        Ed Burns added a comment - Prepare to delete "spec" subcomponent.
        Hide
        Ed Burns added a comment -

        Move all to 1.2

        Show
        Ed Burns added a comment - Move all to 1.2
        Hide
        Manfred Riem added a comment -

        Closing resolved issue out

        Show
        Manfred Riem added a comment - Closing resolved issue out

          People

          • Assignee:
            javaserverfowner
            Reporter:
            Ed Burns
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: