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

Guillaume Sauthier commented on FELIX-4138:
-------------------------------------------

I agree that no exceptions should be thrown at all if factory is already 
disposed/closed.
We can achieve this in multiple ways:
* Check the state of the factory before calling dispose()
* Or better Factory.dispose() check its internal state before doing anything
* Or being notified of state changes through a listener

Anyway, I assume that the creator of the factory and the caller of dispose() 
should be the same (I create, I dispose, not I create, you dispose).
Seems a weird use case for me
WDYT ?

                
> TypeDeclaration calls factory.dispose() even if it already has been disposed 
> (externally)
> -----------------------------------------------------------------------------------------
>
>                 Key: FELIX-4138
>                 URL: https://issues.apache.org/jira/browse/FELIX-4138
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: ipojo-runtime-1.10, ipojo-manipulator-1.10.1
>            Reporter: Pierre Bourret
>            Assignee: Guillaume Sauthier
>             Fix For: ipojo-runtime-1.10.2
>
>
> In some tests, I manually destroy an iPOJO factory by calling 
> IPojoFactory.dispose()
> However, on framweork shutdown, the associated type declaration tries to call 
> the same method again, without checking the factory actual state. It may also 
> be possible that the TypeDeclaration is not unbound despite the fact the 
> factory is not active anymore.

--
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

Reply via email to