diff --git a/org.adempiere.server-feature/pom.xml b/org.adempiere.server-feature/pom.xml index 1b0ac100d5..9905c1dd74 100644 --- a/org.adempiere.server-feature/pom.xml +++ b/org.adempiere.server-feature/pom.xml @@ -117,7 +117,7 @@ 1.0.1 - woodstox + org.codehaus.woodstox wstx-asl 3.2.7 diff --git a/org.adempiere.ui.zk/WEB-INF/src/fi/jawsy/jawwa/zk/atmosphere/AtmosphereServerPush.java b/org.adempiere.ui.zk/WEB-INF/src/fi/jawsy/jawwa/zk/atmosphere/AtmosphereServerPush.java index d2eb43c485..315f87f8db 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/fi/jawsy/jawwa/zk/atmosphere/AtmosphereServerPush.java +++ b/org.adempiere.ui.zk/WEB-INF/src/fi/jawsy/jawwa/zk/atmosphere/AtmosphereServerPush.java @@ -191,19 +191,23 @@ public class AtmosphereServerPush implements ServerPush { log.error(e.getMessage(), e); } if (!ok) { - try { - Thread.sleep(500); - } catch (InterruptedException e1) {} - if (schedules.size() > 0) { + for(int i = 0; i < 3 && !ok; i++) { try { - ok = commitResponse(); - } catch (IOException e) { - log.error(e.getMessage(), e); - } - if (!ok) { - log.warn("Failed to resume long polling resource"); - } - } + Thread.sleep(500); + } catch (InterruptedException e1) {} + if (schedules.size() > 0) { + try { + ok = commitResponse(); + } catch (IOException e) { + log.error(e.getMessage(), e); + } + } else { + ok = true; + } + } + if (!ok) { + log.warn("Failed to resume long polling resource"); + } } } else { //in event listener thread, can schedule immediately @@ -252,12 +256,6 @@ public class AtmosphereServerPush implements ServerPush { log.trace(resource.transport().name()); } - try { - commitResponse(); - } catch (IOException e) { - log.error(e.getLocalizedMessage(), e); - } - DesktopCtrl desktopCtrl = (DesktopCtrl) this.desktop.get(); if (desktopCtrl == null) { log.error("No desktop available");