Amichai Rothman created ARIES-2120:
--------------------------------------

             Summary: Imported service proxy cannot be properly closed 
(potential leak)
                 Key: ARIES-2120
                 URL: https://issues.apache.org/jira/browse/ARIES-2120
             Project: Aries
          Issue Type: Bug
          Components: Remote Service Admin
    Affects Versions: rsa-1.16.1
            Reporter: Amichai Rothman


The main DistributionProvider interface contains two methods, 
exportService and importEndpoint. The former returns an Endpoint which is an 
inteface that extends Closeable, and thus can later be closed by RSA as 
necessary. However, importEndpoint returns the actual proxy instance itself - 
it is created and returned and passed transparently to the caller.
 
The proxy implementation would likely require opening some reasources like 
network sockets etc. in order to do the remote invocation, however in the 
current design there is no lifecycle management, specifically no way to 
properly close the proxy and its backing resources.
 
Having the returned proxy itself implement Closeable would be problematic, 
since the exported/imported interface may have its own close() method (invoked 
remotely) which we do not want to hide. Perhaps, like with the exports, the 
returned object should not be the proxy itself but a wrapper class that 
contains the proxy but is also Closeable or contains some other form of 
lifecycle management, so it can be called by RSA when the proxy and its 
resources should be disposed of. Perhaps there are other, better ways of doing 
this, but they DistributionProvider interface may have to change in any case.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to