use of com.emc.storageos.systemservices.impl.security.SecretsInit in project coprhd-controller by CoprHD.
the class Main method main.
public static void main(String[] args) {
try {
SLF4JBridgeHandler.install();
GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
ctx.getEnvironment().setActiveProfiles(System.getProperty(BUILD_TYPE));
ctx.load(args);
// start ipsec monitor
IPSecMonitor ipsecMonitor = new IPSecMonitor();
ipsecMonitor.setApplicationContext(ctx);
ipsecMonitor.start();
ctx.refresh();
// start syssvc
SysSvcImpl sysservice = (SysSvcImpl) ctx.getBean(SERVICE_BEAN);
sysservice.start();
// start initial ipsec key rotation
SecretsInit initialRotate = (SecretsInit) ctx.getBean(IPSEC_ROTATE_BEAN);
new Thread(initialRotate).start();
} catch (Exception e) {
_log.error("failed to start {}:", SERVICE_BEAN, e);
// Add a delay here before terminating the service, so that DR ZK health
// monitor has a chance to run before restart
_log.error("service is going to restart after {} seconds", WAIT_BEFORE_EXIT_IN_SECONDS);
try {
Thread.sleep(WAIT_BEFORE_EXIT_IN_SECONDS * 1000);
} catch (Exception ex) {
}
System.exit(1);
}
}
Aggregations