mirror of https://github.com/apache/nifi.git
Merge branch 'NIFI-1061' of https://github.com/olegz/nifi into NIFI-1061
This commit is contained in:
commit
054774fe7b
|
@ -603,9 +603,12 @@ public final class StandardProcessScheduler implements ProcessScheduler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the ScheduleState that is registered for the given component; if no ScheduleState current is registered, one is created and registered atomically, and then that value is returned.
|
||||
* Returns the ScheduleState that is registered for the given component; if
|
||||
* no ScheduleState current is registered, one is created and registered
|
||||
* atomically, and then that value is returned.
|
||||
*
|
||||
* @param schedulable schedulable
|
||||
* @param schedulable
|
||||
* schedulable
|
||||
* @return scheduled state
|
||||
*/
|
||||
private ScheduleState getScheduleState(final Object schedulable) {
|
||||
|
|
|
@ -132,7 +132,13 @@ public class DBCPConnectionPool extends AbstractControllerService implements DBC
|
|||
}
|
||||
|
||||
/**
|
||||
* Create new pool, open some connections ready to be used
|
||||
* Configures connection pool by creating an instance of the
|
||||
* {@link BasicDataSource} based on configuration provided with
|
||||
* {@link ConfigurationContext}.
|
||||
*
|
||||
* This operation makes no guarantees that the actual connection could be
|
||||
* made since the underlying system may still go off-line during normal
|
||||
* operation of the connection pool.
|
||||
*
|
||||
* @param context
|
||||
* the configuration context
|
||||
|
@ -163,17 +169,6 @@ public class DBCPConnectionPool extends AbstractControllerService implements DBC
|
|||
dataSource.setUrl(dburl);
|
||||
dataSource.setUsername(user);
|
||||
dataSource.setPassword(passw);
|
||||
|
||||
// verify connection can be established.
|
||||
try {
|
||||
final Connection con = dataSource.getConnection();
|
||||
if (con == null) {
|
||||
throw new InitializationException("Connection to database cannot be established.");
|
||||
}
|
||||
con.close();
|
||||
} catch (final SQLException e) {
|
||||
throw new InitializationException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue