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