[ 
https://issues.apache.org/jira/browse/TUSCANY-4016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Laws closed TUSCANY-4016.
-------------------------------

       Resolution: Fixed
    Fix Version/s: Java-SCA-2.0

At revision: 1291234  I committed a fix and a test. On closer inspection it 
turns out that we added code to the Activator a while back to stop providers if 
there is a failure on start. So the extra stop added here may not do anything 
but it won't do any harm. Moving the stopped composite to the stopped list does 
allow the unused contributions to be unloaded if the appropriate operation is 
called. 

                
> NodeImpl startComposite forgets about a composite if there is a failure on 
> start
> --------------------------------------------------------------------------------
>
>                 Key: TUSCANY-4016
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-4016
>             Project: Tuscany
>          Issue Type: Bug
>          Components: SCA Java Runtime
>    Affects Versions: Java-SCA-2.0-Beta3
>         Environment: All
>            Reporter: Simon Laws
>            Assignee: Simon Laws
>             Fix For: Java-SCA-2.0
>
>
> org.apache.tuscany.sca.impl.NodeImpl does the following on start
>     public void startComposite(String contributionURI, String compositeURI) 
> throws ActivationException, ValidationException, ContributionReadException {
>         String key = contributionURI+"/"+compositeURI;
>         if (startedComposites.containsKey(key)) {
>             throw new IllegalStateException("composite already started: " + 
> compositeURI);
>         }
>         DeployedComposite dc = stoppedComposites.remove(key);
>         if (dc != null) {
>             dc.start();
>             startedComposites.put(key, dc);
> and the following on stop
>         String key = contributionURI+"/"+compositeURI;
>         DeployedComposite dc = startedComposites.remove(key);
>         if (dc != null) {
>             dc.stop();
>             stoppedComposites.put(key, dc);
>         } else {
> If an error is thrown on start it won't be in startedComposites but some of 
> the providers may have been started. So even in the failure case we should 
> consider the composite partially started so that it can be stopped correctly. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to