Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Progressbar shutdown hook

 
Piotr Nowicki
Ranch Hand
Posts: 611
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Ranchers!

Just wondered - when I exit my application which is run in server or standalone mode, the exiting of the application sometimes take few seconds (approx. 2 sec). In the shutdown hook I shutdown the database (and write recordCache back to the file).

Did you provide a progress bar for such operations?

I have a slight problem, because I can add without any problems a progressbar to the methods like checking the host if it's valid I cannot properly show the progress bar for the exit operation.

It just shows the window (JFrame) but no progressbar inside. It seems that the exiting operation is so exhausting that the progress dialog is not drawn fully (same Thread? But then again - is the host checking happening in separate Thread?)

Did anyone have to cope with that problem?

Cheers!

Pedro
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, Pedro!

Did you provide a progress bar for such operations?


Oh, absolutely not. This is needless. It would be just introducing extra complexity.
 
Piotr Nowicki
Ranch Hand
Posts: 611
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roger that and I'm using only Waiting cursor during execution of shutdown hook.

Thanks Roberto!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic