minor log message tweaks
This commit is contained in:
parent
a5c0758371
commit
c7b6e7a75e
2 changed files with 215 additions and 218 deletions
|
@ -278,7 +278,10 @@ public class KnowledgeBaseUpdater {
|
||||||
required = true;
|
required = true;
|
||||||
if (JenaDataSourceSetupBase.isFirstStartup()) {
|
if (JenaDataSourceSetupBase.isFirstStartup()) {
|
||||||
assertSuccess();
|
assertSuccess();
|
||||||
log.info("The application is starting with an empty DB, an indication will be added to the DB that a knowledge base migration to the current version is not required.");
|
log.info("The application is starting with an empty database. " +
|
||||||
|
"An indication will be added to the database that a " +
|
||||||
|
"knowledge base migration to the current version is " +
|
||||||
|
"not required.");
|
||||||
required = false;
|
required = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,16 +121,7 @@ public class SimpleReasonerSetup implements ServletContextListener {
|
||||||
|
|
||||||
if (isRecomputeRequired(sce.getServletContext())) {
|
if (isRecomputeRequired(sce.getServletContext())) {
|
||||||
log.info("ABox inference recompute required.");
|
log.info("ABox inference recompute required.");
|
||||||
|
waitForTBoxReasoning(pelletListener);
|
||||||
int sleeps = 0;
|
|
||||||
while (sleeps < 1000 && pelletListener.isReasoning()) {
|
|
||||||
if ((sleeps % 30) == 0) {
|
|
||||||
log.info("Waiting for initial TBox reasoning to complete");
|
|
||||||
}
|
|
||||||
Thread.sleep(100);
|
|
||||||
sleeps++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (JenaDataSourceSetupBase.isFirstStartup()) {
|
if (JenaDataSourceSetupBase.isFirstStartup()) {
|
||||||
simpleReasoner.recompute();
|
simpleReasoner.recompute();
|
||||||
} else {
|
} else {
|
||||||
|
@ -140,16 +131,7 @@ public class SimpleReasonerSetup implements ServletContextListener {
|
||||||
|
|
||||||
} else if ( isMSTComputeRequired(sce.getServletContext()) ) {
|
} else if ( isMSTComputeRequired(sce.getServletContext()) ) {
|
||||||
log.info("mostSpecificType computation required. It will be done in a separate thread.");
|
log.info("mostSpecificType computation required. It will be done in a separate thread.");
|
||||||
|
waitForTBoxReasoning(pelletListener);
|
||||||
int sleeps = 0;
|
|
||||||
while (sleeps < 1000 && pelletListener.isReasoning()) {
|
|
||||||
if ((sleeps % 30) == 0) {
|
|
||||||
log.info("Waiting for initial TBox reasoning to complete");
|
|
||||||
}
|
|
||||||
Thread.sleep(100);
|
|
||||||
sleeps++;
|
|
||||||
}
|
|
||||||
|
|
||||||
new Thread(new MostSpecificTypeRecomputer(simpleReasoner),"MostSpecificTypeComputer").start();
|
new Thread(new MostSpecificTypeRecomputer(simpleReasoner),"MostSpecificTypeComputer").start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,6 +146,18 @@ public class SimpleReasonerSetup implements ServletContextListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void waitForTBoxReasoning(PelletListener pelletListener)
|
||||||
|
throws InterruptedException {
|
||||||
|
int sleeps = 0;
|
||||||
|
while (sleeps < 1000 && pelletListener.isReasoning()) {
|
||||||
|
if ((sleeps % 10) == 0) { // print message at 10 second intervals
|
||||||
|
log.info("Waiting for initial TBox reasoning to complete");
|
||||||
|
}
|
||||||
|
Thread.sleep(1000);
|
||||||
|
sleeps++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void contextDestroyed(ServletContextEvent sce) {
|
public void contextDestroyed(ServletContextEvent sce) {
|
||||||
log.info("received contextDestroyed notification");
|
log.info("received contextDestroyed notification");
|
||||||
|
|
Loading…
Add table
Reference in a new issue