Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-637

Java Console app doesn't exit

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.7.0
    • Helium
    • Java
    • Security Level: Public
    • CBL Sprint 13, CBL Sprint 14, CBL Sprint 16
    • 8

    Description

      The console app that uses CBL Java needs to do System.exit(0) to exit the app. This is likely caused by un-shutdown work executors that we use internally.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          pasin Pasin Suriyentrakorn created issue -
          pasin Pasin Suriyentrakorn made changes -
          Field Original Value New Value
          Labels known_issue
          daniel.petersen Daniel Petersen made changes -
          Summary Java Console app doest exit Java Console app doesn't exit
          daniel.petersen Daniel Petersen made changes -
          Story Points 8
          daniel.petersen Daniel Petersen made changes -
          Assignee The Lite [ cbgto ] Pasin Suriyentrakorn [ pasin ]
          daniel.petersen Daniel Petersen made changes -
          Sprint CBL Sprint 13 [ 986 ]
          daniel.petersen Daniel Petersen made changes -
          Rank Ranked higher
          blake.meike Blake Meike made changes -
          Sprint CBL Sprint 13 [ 986 ] CBL Sprint 13, CBL Sprint 14 [ 986, 993 ]
          daniel.petersen Daniel Petersen made changes -
          Sprint CBL Sprint 13, CBL Sprint 14 [ 986, 993 ] CBL Sprint 13, CBL Sprint 14, CBL Sprint 15 [ 986, 993, 1005 ]
          daniel.petersen Daniel Petersen made changes -
          Sprint CBL Sprint 13, CBL Sprint 14, CBL Sprint 15 [ 986, 993, 1005 ] CBL Sprint 13, CBL Sprint 14, CBL Sprint 16 [ 986, 993, 1006 ]
          daniel.petersen Daniel Petersen made changes -
          Rank Ranked lower
          pasin Pasin Suriyentrakorn added a comment - - edited

          I couldn't think a better way beside adding an API such as CouchbaseLite.deinit() or .shutdown() to shutdown the executor service. I have thought that maybe we lazy creates the executor and shutdown the executor when there are no database opens. However, this doesn't seem to work well as :

          1. The executor could be used by non-database components such as C4Log. Maybe we need to list all of these and see if we can avoid using the global executor service or not.
          2. There is no requirement that the app needs to close the database when exits. Maybe this is required for Java if they want to close the app gracefully beside using System.exit().

          The problem about CouchbaseLite.shutdown() is that it cannot be called safety if some components are still using it.

          pasin Pasin Suriyentrakorn added a comment - - edited I couldn't think a better way beside adding an API such as CouchbaseLite.deinit() or .shutdown() to shutdown the executor service. I have thought that maybe we lazy creates the executor and shutdown the executor when there are no database opens. However, this doesn't seem to work well as : The executor could be used by non-database components such as C4Log. Maybe we need to list all of these and see if we can avoid using the global executor service or not. There is no requirement that the app needs to close the database when exits. Maybe this is required for Java if they want to close the app gracefully beside using System.exit(). The problem about CouchbaseLite.shutdown() is that it cannot be called safety if some components are still using it.
          pasin Pasin Suriyentrakorn made changes -
          Assignee Pasin Suriyentrakorn [ pasin ] The Lite [ cbgto ]
          daniel.petersen Daniel Petersen made changes -
          Priority Major [ 3 ] Minor [ 4 ]
          blake.meike Blake Meike made changes -
          Fix Version/s Lithium [ 16190 ]
          Fix Version/s Hydrogen [ 16189 ]
          daniel.petersen Daniel Petersen made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          daniel.petersen Daniel Petersen made changes -
          Priority Major [ 3 ] Minor [ 4 ]
          daniel.petersen Daniel Petersen made changes -
          Priority Minor [ 4 ] Critical [ 2 ]
          daniel.petersen Daniel Petersen made changes -
          Priority Critical [ 2 ] Minor [ 4 ]
          daniel.petersen Daniel Petersen made changes -
          Fix Version/s Helium [ 17136 ]
          Fix Version/s Lithium [ 16190 ]
          blake.meike Blake Meike made changes -
          Issue Type Task [ 3 ] Improvement [ 4 ]
          daniel.petersen Daniel Petersen made changes -
          Rank Ranked lower
          daniel.petersen Daniel Petersen made changes -
          Component/s Java-Desktop [ 15911 ]
          Component/s Java-AppServer [ 15345 ]

          People

            The Lite The Lite
            pasin Pasin Suriyentrakorn
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty