RFR(S): JDK-8148104 HSDB could not terminate when launched on CLI.

Jaroslav Bachorik jaroslav.bachorik at oracle.com
Mon Jan 25 09:11:54 UTC 2016


On 23.1.2016 12:13, Dmitry Samersoff wrote:
> Everybody,
>
> Here is a small patch provided by KUBOTA Yuji.
>
> http://cr.openjdk.java.net/~dsamersoff/sponsorship/kubota.yuji/JDK-8148104/webrev.01/
>
> The problem:
>
> Running HSDB by jhsdb on CLI i.e. without x11 display, HSDB could
> not terminate after throwing HeadlessException.
>
> HSDB starts WorkerThread before making the JFrame. If we run HSDB on
> CLI, HSDB throws HeadlessException when makes the JFrame. Thus, the
> WorkerThread has never shutdown, then HSDB can not terminate.
>
> Solution:
>
> Create frame before we initialize agent.

While this solution will work in this case I think it would be better to 
daemonize the WorkerThread 
(hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/WorkerThread.java) 
- that should ensure that the application will be allowed to terminate 
even though the worker thread is still running.

-JB-

>
> -Dmitry
>



More information about the serviceability-dev mailing list