Geotoolkit

Background threads managed by ThreadedAuthorityFactory delay JVM exit.

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 3.05
  • Fix Version/s: 3.06
  • Component/s: Referencing
  • Labels:

Description

ThreadedAuthorityFactory creates a few background threads for closing the JDBC connections after a timeout. However those threads delay the JVM exit by an amount of time approximatively equals to the timeout, which is about one minute in current implementation.

To allow immediate JVM exit, we need to declare those threads as daemon threads, except if they are executed during a JVM shutdown in which case we want to let the threads complete. I'm not sure however if marking a thread as non-daemon is suffisient - once a JVM shutdown is initiated, it may be too late.

Activity

Hide
Martin Desruisseaux added a comment - 11/Nov/2009 16:01

Fix commited, but there is a risk of race condition during the execution of org.geotoolkit.internal.Threads.shutdown(). Waiting to see how it behaves in practice (and eventually complete the fix) before to close this issue.

Show
Martin Desruisseaux added a comment - 11/Nov/2009 16:01 Fix commited, but there is a risk of race condition during the execution of org.geotoolkit.internal.Threads.shutdown(). Waiting to see how it behaves in practice (and eventually complete the fix) before to close this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    11/Nov/2009 15:02
    Updated:
    13/Apr/2011 15:05
    Resolved:
    11/Nov/2009 16:01

Time Tracking

Estimated:
2h
Original Estimate - 2 hours
Remaining:
0m
Remaining Estimate - 0 minutes
Logged:
2h
Time Spent - 2 hours