You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Joe Bergmark (JIRA)" <ji...@apache.org> on 2010/08/16 21:58:20 UTC

[jira] Created: (OWB-440) WebBeansDecoratorConfig.getDecoratorStack always returns new Decorators

WebBeansDecoratorConfig.getDecoratorStack always returns new Decorators
-----------------------------------------------------------------------

                 Key: OWB-440
                 URL: https://issues.apache.org/jira/browse/OWB-440
             Project: OpenWebBeans
          Issue Type: Bug
          Components: Interceptor and Decorators
    Affects Versions: 1.0.0-alpha-1
            Reporter: Joe Bergmark
            Assignee: Joe Bergmark


WebBeansDecoratorConfig.getDecoratorStack's call to 

ownerCreationalContext.getDependentDecorator(decorator)

always returns null, even if the owning bean is called multiple times within its lifecycle.  Because of this, you always get a new instance of the Decorators for each method call when you would expect Dependant scoped instances to live as long as their parent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OWB-440) WebBeansDecoratorConfig.getDecoratorStack always returns new Decorators

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899082#action_12899082 ] 

Joe Bergmark commented on OWB-440:
----------------------------------

Solving this seems to be pretty straight forward.  CreationalContextImpl's   getDependentDecorators() was previously always creating an empty list and iterating over that list.  Changing this to pass the instance and looking up the dependent creational contexts using by object instance allows us to find the dependent decorators.  This mimics the behavior the interceptor version of this method.

However, this change appears to break the MultipleDecoratorStackTest unit test, so I'm going to hold off until I can figure out if that test itself is broken, or if the DelegateHandler or surrounding code made some bad assumptions about a clean decorator stack each time which may no longer be true.

> WebBeansDecoratorConfig.getDecoratorStack always returns new Decorators
> -----------------------------------------------------------------------
>
>                 Key: OWB-440
>                 URL: https://issues.apache.org/jira/browse/OWB-440
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: 1.0.0-alpha-1
>            Reporter: Joe Bergmark
>            Assignee: Joe Bergmark
>
> WebBeansDecoratorConfig.getDecoratorStack's call to 
> ownerCreationalContext.getDependentDecorator(decorator)
> always returns null, even if the owning bean is called multiple times within its lifecycle.  Because of this, you always get a new instance of the Decorators for each method call when you would expect Dependant scoped instances to live as long as their parent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OWB-440) WebBeansDecoratorConfig.getDecoratorStack always returns new Decorators

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bergmark resolved OWB-440.
------------------------------

    Fix Version/s: 1.0.0-alpha-2
       Resolution: Fixed

Fixed the last remaining problem from the unit test.  When we found the existing decorator in the creational context we weren't updating the delegate so the old one would mistakenly get reused and we would lose our position in the decorator stack.

> WebBeansDecoratorConfig.getDecoratorStack always returns new Decorators
> -----------------------------------------------------------------------
>
>                 Key: OWB-440
>                 URL: https://issues.apache.org/jira/browse/OWB-440
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: 1.0.0-alpha-1
>            Reporter: Joe Bergmark
>            Assignee: Joe Bergmark
>             Fix For: 1.0.0-alpha-2
>
>
> WebBeansDecoratorConfig.getDecoratorStack's call to 
> ownerCreationalContext.getDependentDecorator(decorator)
> always returns null, even if the owning bean is called multiple times within its lifecycle.  Because of this, you always get a new instance of the Decorators for each method call when you would expect Dependant scoped instances to live as long as their parent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.