private void initServices() {
// JTA
- String tmType = KernelUtils.getFrameworkProp(NodeConstants.TRANSACTION_MANAGER, NodeConstants.TRANSACTION_MANAGER_SIMPLE);
+ String tmType = KernelUtils.getFrameworkProp(NodeConstants.TRANSACTION_MANAGER,
+ NodeConstants.TRANSACTION_MANAGER_SIMPLE);
if (NodeConstants.TRANSACTION_MANAGER_SIMPLE.equals(tmType)) {
initSimpleTransactionManager();
} else if (NodeConstants.TRANSACTION_MANAGER_BITRONIX.equals(tmType)) {
throw new CmsException("Usupported transaction manager type " + tmType);
}
+
+ // POI
+// POIXMLTypeLoader.setClassLoader(CTConnection.class.getClassLoader());
+
+ // Tika
+// OpenDocumentParser odfParser = new OpenDocumentParser();
+// bc.registerService(Parser.class, odfParser, new Hashtable());
+// PDFParser pdfParser = new PDFParser();
+// bc.registerService(Parser.class, pdfParser, new Hashtable());
+// OOXMLParser ooxmlParser = new OOXMLParser();
+// bc.registerService(Parser.class, ooxmlParser, new Hashtable());
+// TesseractOCRParser ocrParser = new TesseractOCRParser();
+// ocrParser.setLanguage("ara");
+// bc.registerService(Parser.class, ocrParser, new Hashtable());
+
// JCR
RepositoryServiceFactory repositoryServiceFactory = new RepositoryServiceFactory();
stopHooks.add(() -> repositoryServiceFactory.shutdown());
if (kernelThread != null)
kernelThread.destroyAndJoin();
- applyStopHooks();
+ // In a different state in order to avois interruptions
+ new Thread(() -> applyStopHooks(), "Apply Argeo Stop Hooks").start();
+ // applyStopHooks();
long duration = ((System.currentTimeMillis() - availableSince) / 1000) / 60;
log.info("## ARGEO CMS STOPPED after " + (duration / 60) + "h " + (duration % 60) + "min uptime ##");