I wrote some code using documents4j library to convert some documents from .docx to .pdf. 
I followed the examples in the documentation and the convertion works perfectly using MS-Word, but I notice that after all conversions complete and methods return, the java application result still running and it seems not to exit.
If I explicitly close the converter using execute() and shutDown() methods instead of schedule(), the application exit, but I need this application run in concurrent mode, so I can't explicitly invoke shutDown() otherwise I cause MS-Word exits and breaks some still opened documents.
What is the best way to use the converter to achieve these objectives? Has LocalConverter got a method to check if there is a queue of documents to be converted? With this information I could invoke shutDown() only with an empty queue and instantiate a new LocalConverter on the next converting request.
Thanks in advance for your replies!
Dan