Skip to content

LoadingMessageSourceProvider can cause OOM errors  #1

@jdoklovic

Description

@jdoklovic

LoadingMessageSourceProvider creates a thread factory which creates daemon threads with no way of shutting them down.

The comments explicitly states:
/*
* Use daemon threads. We don't give control to the user about the
* ExecutorService, and we don't have a reliable way to shut it down (a JVM
* shutdown hook does not get involved on a webapp shutdown, so we cannot
* use that...).
*/

Unfortunately, this can cause OutOfMemory errors, especially in an OSGi environment, when these threads stay alive across bundle restarts. This provider should expose a way to safely shutdown / manage the lifecycle of the executor service threads.

Also, json-schema-validator which consumes this library should also expose a way to shut this down.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions