[ 
https://issues.apache.org/jira/browse/ARIES-2120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18077434#comment-18077434
 ] 

ASF subversion and git services commented on ARIES-2120:
--------------------------------------------------------

Commit 7343c7ca65bb05d16f396221a7083c9c60375cf8 in aries-rsa's branch 
refs/heads/dependabot/maven/jakarta.ws.rs-jakarta.ws.rs-api-4.0.0 from Amichai 
Rothman
[ https://gitbox.apache.org/repos/asf?p=aries-rsa.git;h=7343c7ca ]

ARIES-2120 Change DistributionProvider to return a Closeable ImportedService so 
that resources can be properly released


> 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
>            Priority: Major
>             Fix For: rsa-2.0.0
>
>
> 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