Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-1975

BinaryDataHandler leaves input stream open

    Details

    • Type: Bug
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: OpenMRS 1.8.0, OpenMRS 1.9.0
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Undetermined

      Description

      The BinaryDataHandler "getObs" method creates a complex obs where the data component is a FileInputStream. The getObs method leaves this input stream open when it returns the obs so that other methods (such as the ComplexObsServlet) can access the stream.

      However, if the stream is not explicitly closed, the lock on the file is never released until the webapp is restarted. We need a better clean-up method so that if the obs is no longer referenced, the input stream is closed.

        Gliffy Diagrams

          Attachments

            Attachments-Category-Modification

              Activity

                People

                • Assignee:
                  mogoodrich Mark Goodrich
                  Reporter:
                  mogoodrich Mark Goodrich
                  Watchers:
                  Ben Wolfe, Mark Goodrich
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: