Uploaded image for project: 'honeycomb'
  1. honeycomb
  2. HONEYCOMB-380

Handle (Auto)Closable components in consistent manner

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Medium Medium
    • 17.10
    • None
    • HC infra

      (Auto)Closable components needs to be closed manually before JVM shutdown.

      We cannot rely on GC here, cause this may cause resource leaks (or even security issues).

      For jvpp components we used:

       

      Runtime.getRuntime().addShutdownHook(new Thread()

      (...)

      public void run() {

         jvpp.close();

      }

       

      We should at least provide some utility to decrease code repetition.

      In order to minimize number of Threads needed, we could provide some component that would maintain list of closable components and take care of releasing resources.

       

            Unassigned Unassigned
            mgradzki Marek Gradzki
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: