You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Laws (JIRA)" <de...@tuscany.apache.org> on 2011/05/24 11:12:47 UTC

[jira] [Created] (TUSCANY-3867) Confirm that framework/extension/composite starts and stops all happen in the right places

Confirm that framework/extension/composite starts and stops all happen in the right places
------------------------------------------------------------------------------------------

                 Key: TUSCANY-3867
                 URL: https://issues.apache.org/jira/browse/TUSCANY-3867
             Project: Tuscany
          Issue Type: Bug
          Components: SCA Java Runtime
            Reporter: Simon Laws
            Priority: Minor
             Fix For: Java-SCA-2.0


Looking at some of the tests I'm not sure that we catch all of the start/stop situations. It's not clear though so I'm raising this JIRA and I'll write a test to track what's going on. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TUSCANY-3867) Confirm that framework/extension/composite starts and stops all happen in the right places

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13046419#comment-13046419 ] 

Simon Laws commented on TUSCANY-3867:
-------------------------------------

This is the way I think it should work... 

Tuscany will start a composite when requested and, assuming that there are no errors at this stage, will mark all components as started, see RuntimeComponent.isStarted(). A component being started doesn't necessarily mean that implementation instances will exist but it does mean that it's implementation and binding providers will have been started. If an error is detected during start the runtime will stop any providers it's already started for the failing component and then return an exception. It's the Node's (or whatever calls the activator) responsibility to call stop on the activator to stop any other components that have been started. 

Component instances themselves are created in different ways depending on component scope and other configuration. Here are the combinations. 

COMPOSITE/@EagerInit - one instance is created at component start time 
COMPOSITE - One instance is created at the time the first message arrives 
STATELESS - A new instance is created for each message 

These different configurations have an impact on how errors are handled and hence how shutdown operates. The general rule of thumb is that if an exception is detected while the composite is being started (the COMPOSITE/@EagerInit case) then the Node will trap the error and use the underlying SPI to shut down all the components in the composite before throwing the exception to the code that called start. If the exception is detected on receipt of a message then just the implementation instance is removed and the component remains in the started state until the code that called the node calls node.stop

> Confirm that framework/extension/composite starts and stops all happen in the right places
> ------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3867
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3867
>             Project: Tuscany
>          Issue Type: Bug
>          Components: SCA Java Runtime
>            Reporter: Simon Laws
>            Assignee: Simon Laws
>            Priority: Minor
>             Fix For: Java-SCA-2.0
>
>
> Looking at some of the tests I'm not sure that we catch all of the start/stop situations. It's not clear though so I'm raising this JIRA and I'll write a test to track what's going on. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (TUSCANY-3867) Confirm that framework/extension/composite starts and stops all happen in the right places

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws reassigned TUSCANY-3867:
-----------------------------------

    Assignee: Simon Laws

> Confirm that framework/extension/composite starts and stops all happen in the right places
> ------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3867
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3867
>             Project: Tuscany
>          Issue Type: Bug
>          Components: SCA Java Runtime
>            Reporter: Simon Laws
>            Assignee: Simon Laws
>            Priority: Minor
>             Fix For: Java-SCA-2.0
>
>
> Looking at some of the tests I'm not sure that we catch all of the start/stop situations. It's not clear though so I'm raising this JIRA and I'll write a test to track what's going on. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (TUSCANY-3867) Confirm that framework/extension/composite starts and stops all happen in the right places

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws closed TUSCANY-3867.
-------------------------------

    Resolution: Fixed

Fixed by a small number of recent changes. I believe that the runtime behaves in the way I described in my previous comment however if people have concerns that this is not the correct behaviour then shout and we can review. 

> Confirm that framework/extension/composite starts and stops all happen in the right places
> ------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3867
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3867
>             Project: Tuscany
>          Issue Type: Bug
>          Components: SCA Java Runtime
>            Reporter: Simon Laws
>            Assignee: Simon Laws
>            Priority: Minor
>             Fix For: Java-SCA-2.0
>
>
> Looking at some of the tests I'm not sure that we catch all of the start/stop situations. It's not clear though so I'm raising this JIRA and I'll write a test to track what's going on. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira