marklogic / marklogic-jena

Adapter for using MarkLogic with the Jena RDF Framework
Other
5 stars 11 forks source link

Timer for microbatch of add() is never cancelled. #17

Closed grechaw closed 8 years ago

grechaw commented 9 years ago

When you start an application with marklogic-jena, there's a timer task to ensure triples added wit add() are periodically flushed and sent to the server. This timer task should be cancelled in some final block. It can block an application stopping now.

grechaw commented 9 years ago

I actually have the fix ready for this. when you close() a connection, the timer is cancelled.

grechaw commented 9 years ago

I was able to verify this fix by running examples, and comparing behavior with and without close().

If you don't close(), then the timer task may prevent the main loop from exiting.

kkanthet commented 9 years ago

Verified the timer thread is closed when dataset is closed.