fixed log
This commit is contained in:
parent
60c4ccf03f
commit
9c220fa0da
|
@ -444,7 +444,7 @@ public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPlugin
|
|||
private PostgisIndexer getIndexer(UseCaseDescriptor ucd, Document params)
|
||||
throws ConfigurationException, SQLException, InvalidProfileException, SDIInteractionException {
|
||||
|
||||
//Added by Francesco
|
||||
// Added by Francesco
|
||||
databaseConnectionValidator();
|
||||
|
||||
PostgisIndexer indexer = new PostgisIndexer(sdiCache.getObject(), ucd, postgisCache.getObject());
|
||||
|
@ -468,10 +468,10 @@ public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPlugin
|
|||
connectionParameters.getUser(), connectionParameters.getPwd());
|
||||
// Check if the connection is valid (timeout 30 seconds)
|
||||
if (connection != null && connection.isValid(CONNECTION_TIMEOUT)) {
|
||||
log.debug("Connection to DB {} is OK!", connectionParameters.getUrl());
|
||||
log.debug("Connection to DB " + connectionParameters.getUrl() + " is OK!");
|
||||
return true;
|
||||
} else {
|
||||
log.debug("Connection to DB {} is KO!", connectionParameters.getUrl());
|
||||
log.debug("Connection to DB " + connectionParameters.getUrl() + " is KO!");
|
||||
return false;
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
|
@ -489,14 +489,14 @@ public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPlugin
|
|||
int attempt = 0;
|
||||
while (!checkDatabaseConnection() && attempt <= maxRetry) {
|
||||
attempt++;
|
||||
log.info("Attempt number: {}", attempt);
|
||||
log.info("Attempt number:" + attempt);
|
||||
log.info("Disposing the PostGis Cache");
|
||||
postgisCache.shutdown();
|
||||
log.info("Loading the PostGis Cache for context");
|
||||
try {
|
||||
postgisCache.getObject();
|
||||
} catch (ConfigurationException e) {
|
||||
log.warn("DtabaseConnectionValidatorError on reading connection configuration: ", e);
|
||||
log.warn("DatabaseConnectionValidator on reading connection configuration: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue