Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.2.0
    • Labels:
      None

      Description

      @Dependent beans must be interceptable, although implementations are not required to provide a client proxy for them.

        Activity

        Hide
        Joe Bergmark added a comment -

        At the same time make them decoratable as well.

        Show
        Joe Bergmark added a comment - At the same time make them decoratable as well.
        Hide
        Gurkan Erdogdu added a comment -

        I have implemented this. I have committed it.

        Show
        Gurkan Erdogdu added a comment - I have implemented this. I have committed it.
        Hide
        Joe Bergmark added a comment -

        I do not believe the current commit completely solve all of the problems. There are two things that I believe should work with dependent scoped beans.

        1) public fields in the bean should work as expected. If we shield a bean with a proxy in the middle, then public field operations occur on the proxy, but the actual method calls flow through into the actual bean instance. This leads to strange behavior. I'll attach a testcase I wrote while I was working on this.

        2) To my knowledge dependent scoped beans don't require a default constructor. 3.1.3 allows for constructors annotated with @Inject, and I believe only 5.4.1 restricts this further. The committed change to LifecycleBean looks like the same problem I ran into in my first couple attempts.

        I'm still working on this area myself, just wanted to share some of my thoughts.

        Show
        Joe Bergmark added a comment - I do not believe the current commit completely solve all of the problems. There are two things that I believe should work with dependent scoped beans. 1) public fields in the bean should work as expected. If we shield a bean with a proxy in the middle, then public field operations occur on the proxy, but the actual method calls flow through into the actual bean instance. This leads to strange behavior. I'll attach a testcase I wrote while I was working on this. 2) To my knowledge dependent scoped beans don't require a default constructor. 3.1.3 allows for constructors annotated with @Inject, and I believe only 5.4.1 restricts this further. The committed change to LifecycleBean looks like the same problem I ran into in my first couple attempts. I'm still working on this area myself, just wanted to share some of my thoughts.
        Hide
        Gurkan Erdogdu added a comment -

        I have re-opened this issue. I have tried your concern in RI and it does not work either. I am re-opening this issue because of tracking.

        Show
        Gurkan Erdogdu added a comment - I have re-opened this issue. I have tried your concern in RI and it does not work either. I am re-opening this issue because of tracking.
        Hide
        Gurkan Erdogdu added a comment -

        For tracking

        Show
        Gurkan Erdogdu added a comment - For tracking
        Hide
        Mark Struberg added a comment -

        moved to 1.0.0-GA

        Show
        Mark Struberg added a comment - moved to 1.0.0-GA
        Hide
        Mark Struberg added a comment -

        This is still not working.
        Comment in the section

        Assert.assertTrue(DependentInterceptor.refCount == 1);

        in DependentInterceptorTest#testLifecycle() to see what I mean.

        Show
        Mark Struberg added a comment - This is still not working. Comment in the section Assert.assertTrue(DependentInterceptor.refCount == 1); in DependentInterceptorTest#testLifecycle() to see what I mean.
        Hide
        Mark Struberg added a comment -

        will get resolved while fixing OWB-344

        Show
        Mark Struberg added a comment - will get resolved while fixing OWB-344
        Hide
        Mark Struberg added a comment -

        After moving the Interceptor + Decorator creation to the InjectionTarget this finally works!

        Show
        Mark Struberg added a comment - After moving the Interceptor + Decorator creation to the InjectionTarget this finally works!
        Hide
        Mark Struberg added a comment -

        shipped in OWB-1.2.0

        Show
        Mark Struberg added a comment - shipped in OWB-1 .2.0

          People

          • Assignee:
            Mark Struberg
            Reporter:
            Eric Covener
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 48h
              48h
              Remaining:
              Remaining Estimate - 48h
              48h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development