synchronized(lock) {
if (audit == null) {
MQAuditService.init();
try {
audit = MQAuditService.getAuditSession();
LockFile lf = LockFile.getCurrentLockFile();
if (lf != null) {
audit.setInstance(lf.getInstance(),lf.getHost(), lf.getPort());
}
} catch (BrokerException ex) {
getLogger().logStack(Logger.ERROR, ex.toString(), ex);
Broker.getBroker().exit(BrokerExitCode.ERROR, ex.toString(), BrokerEvent.Type.EXCEPTION);
}