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


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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to