• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ScheduledService only appears to run once

 
Roy Henderson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First post so please excuse any protocol mistakes.

I'm debugging a new JavaFX8 FXML application in NetBeans 8.1 on Windows 7. The application is using ScheduledService to periodically retrieve a value and then update the display.

The ScheduledService appears to only work once and then the application stalls. It starts SCHEDULED, goes to RUNNING, goes to SUCCEEDED but then nothing else. The GUI is correctly updated (by the onSucceeded handler).

I know I haven't included any source code yet. What I was looking for initially was feedback on if anyone else has experienced this type of issue or if anyone can offer any general suggestions why the ScheduledService does not transition from SUCCEEDED back to SCHEDULED after first cycle?

Thanks in advance,

Roy
 
Roy Henderson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After more digging I have now resolved the problem although I still don't know what was causing it.

In order to trace the flow, I had added several on<Event> handlers and also defined the equivalent methods for ready / scheduled / succeeded etc.

Somehow it appears these were getting deadlocked. After removing all except onSucceeded the application is now working correctly again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic