You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@onami.apache.org by "Simone Tripodi (JIRA)" <ji...@apache.org> on 2013/01/06 20:54:12 UTC

[jira] [Commented] (ONAMI-43) Lifecycle management on Injector creation failure and for @Provides methods

    [ https://issues.apache.org/jira/browse/ONAMI-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13545475#comment-13545475 ] 

Simone Tripodi commented on ONAMI-43:
-------------------------------------

while I am +1 to apply your improvements, I would like you split the proposed issue/patch to 3 sub-issues with related patches, to see which changes are related to every single topic.
That is not just related to that issue, granularization is generally a good practice followed in every project at ASF.

I had a quick look at the patch and noticed that:

 * you could implement [3] simply by replacing the {{List<Disposable> disposables}} with a {{Stack<Disposable> disposables}} that is a LIFO queue;

 * you reorganized internal classes - that should be discussed in a totally different thread/issue and not included in that one.

TIA!!!
                
> Lifecycle management on Injector creation failure and for @Provides methods
> ---------------------------------------------------------------------------
>
>                 Key: ONAMI-43
>                 URL: https://issues.apache.org/jira/browse/ONAMI-43
>             Project: Apache Onami
>          Issue Type: New Feature
>          Components: lifecycle
>            Reporter: Mikhail Mazursky
>         Attachments: ONAMI-43.patch
>
>
> 1. Sometimes Injector creation can fail and in that case all created resources must be disposed anyway.
> 2. It should be possible to register objects for disposal from @Provides methods - i added DisposableRegistrator for that.
> 3. Disposables should be processed in reverse order to their registration.
> See the attached patch. WDYT?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira