[JBWS-3654]:Fix intermittent failure in endpoint publish