[ 
https://issues.apache.org/jira/browse/TUSCANY-2215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600557#action_12600557
 ] 

haleh mahbod commented on TUSCANY-2215:
---------------------------------------

Hi, 
would you be interested to submit a patch if you know how to fix it? Here is 
the guideline for submitting a patch:
http://incubator.apache.org/tuscany/issue-tracking.html

> Destory method is not called if scope type is request
> -----------------------------------------------------
>
>                 Key: TUSCANY-2215
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2215
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-Next
>            Reporter: Gilbert Kwan
>             Fix For: Java-SCA-Next
>
>
> Destroy method was not called for @Scope("REQUEST").
> Service Definition:
> =============
> @Scope("REQUEST")
> public class AServiceImpl implements AService {
>    @Init
>    public void init() {
>        System.out.println("init()");
>    }
>    @Destroy
>    public void destroy() {
>        System.out.println("destroy()");
>    }
>    public void xxx() {
>        System.out.println("xxx()");    }
> }
> Client called:
> =========
>       System.out.println("Setting up");
>       domain = SCADomain.newInstance(compositeName);
>       aService = domain.getService(AService.class, "AService");
>       aService.xxx();
>        System.out.println("Cleaning up");
>        if (domain != null)
>            domain.close();
> Output:
> ======
> Setting up
> init()
> xxx()
> Cleaning up
> When changed to other scope type, the destroy method could be called.

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

Reply via email to