if ( brokerCredentialsFile != null && brokerCredentialsFile.length() > 0 ) {
String path ="";
try {
Utils.findDuccHome(); // add DUCC_HOME to System.properties
path = Utils.resolvePlaceholderIfExists(brokerCredentialsFile, System.getProperties());
Credentials credentials = BrokerCredentials.get(path);
if ( credentials.getUsername() != null && credentials.getPassword() != null ) {
duccAMQComponent.setUserName(credentials.getUsername());
duccAMQComponent.setPassword(credentials.getPassword());
}
} catch(FileNotFoundException e) {
System.out.println("DuccAdmin Failed - File Not Found:"+path+" Broker Credentials File:"+brokerCredentialsFile);
System.exit(-1);
}