try{
if (newSetupImpl.shouldGetSessionOnCreateFactory(deployProperties)) {
ServerSession session = getServerSession();
CommandManager rcm = session.getCommandManager();
if (rcm != null && newSetupImpl.shouldSendMetadataRefreshCommand(deployProperties)) {
MetadataRefreshCommand command = new MetadataRefreshCommand(properties);
rcm.propagateCommand(command);
}
session.setRefreshMetadataListener(newSetupImpl);
}
} catch (RuntimeException ex) {