Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1597

Decorator called twice.

XMLWordPrintable

    • Hide

      Create a test interface.
      Create a bean that is ApplicationScoped and implements the test interface..
      Create a method in the bean that returns this from the bean.
      Create a decorator for the bean that implements the test interface.
      Inject the bean into another class.
      Call the method that returns this on the test bean.
      Call a method on the proxy bean returned from the method that returns this.
      The decorator is called twice before the super bean is called.

      Show
      Create a test interface. Create a bean that is ApplicationScoped and implements the test interface.. Create a method in the bean that returns this from the bean. Create a decorator for the bean that implements the test interface. Inject the bean into another class. Call the method that returns this on the test bean. Call a method on the proxy bean returned from the method that returns this. The decorator is called twice before the super bean is called.

      A decorator instance may be called twice when it decorates an ApplicationScoped bean that returns this from a method call.
      This only occurs if the bean is decorated and the proxy returned by a reference to this is used to call a method.

            Unassigned Unassigned
            smangan_jira smangan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: