minor - reduce server push exception logging level
This commit is contained in:
parent
7412778942
commit
db6295a9ad
|
@ -28,17 +28,17 @@ import org.zkoss.zk.ui.Executions;
|
||||||
public class ServerPushTemplate {
|
public class ServerPushTemplate {
|
||||||
|
|
||||||
private Desktop desktop;
|
private Desktop desktop;
|
||||||
|
|
||||||
private final static CLogger logger = CLogger.getCLogger(ServerPushTemplate.class);
|
private final static CLogger logger = CLogger.getCLogger(ServerPushTemplate.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param desktop
|
* @param desktop
|
||||||
*/
|
*/
|
||||||
public ServerPushTemplate(Desktop desktop) {
|
public ServerPushTemplate(Desktop desktop) {
|
||||||
this.desktop = desktop;
|
this.desktop = desktop;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute callback in UI thread
|
* Execute callback in UI thread
|
||||||
* @param callback
|
* @param callback
|
||||||
|
@ -46,7 +46,7 @@ public class ServerPushTemplate {
|
||||||
public void execute(IServerPushCallback callback) {
|
public void execute(IServerPushCallback callback) {
|
||||||
boolean inUIThread = Executions.getCurrent() != null;
|
boolean inUIThread = Executions.getCurrent() != null;
|
||||||
boolean desktopActivated = false;
|
boolean desktopActivated = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!inUIThread) {
|
if (!inUIThread) {
|
||||||
//1 second timeout
|
//1 second timeout
|
||||||
|
@ -58,16 +58,16 @@ public class ServerPushTemplate {
|
||||||
}
|
}
|
||||||
callback.updateUI();
|
callback.updateUI();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.log(Level.WARNING, "Server push error="+e.getLocalizedMessage(), e);
|
logger.log(Level.INFO, "Server push error="+e.getLocalizedMessage(), e);
|
||||||
} finally {
|
} finally {
|
||||||
if (!inUIThread && desktopActivated) {
|
if (!inUIThread && desktopActivated) {
|
||||||
Executions.deactivate(desktop);
|
Executions.deactivate(desktop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return desktop
|
* @return desktop
|
||||||
*/
|
*/
|
||||||
public Desktop getDesktop() {
|
public Desktop getDesktop() {
|
||||||
|
|
Loading…
Reference in New Issue