// the admin events will be sent by the DuccServiceReaper
targetEndpoint = System.getProperty("ducc.admin.endpoint");
System.out.println("+++ Activating JMS Component for Endpoint:"
+ targetEndpoint + " Broker:" + brokerUrl);
ActiveMQComponent duccAMQComponent = new ActiveMQComponent(context);
duccAMQComponent.setBrokerURL(brokerUrl);
// context.addComponent("activemq",
// ActiveMQComponent.activeMQComponent(brokerUrl));
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);
}