Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-2120

Imported service proxy cannot be properly closed (potential leak)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • rsa-1.16.1
    • None
    • Remote Service Admin
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            amichai Amichai Rothman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: