From bc9f8dee7b616287f33f0bc91797e52380165286 Mon Sep 17 00:00:00 2001 From: cmurialdo Date: Fri, 9 Apr 2021 15:54:56 -0300 Subject: [PATCH 1/3] Avoid scanning batchCursors at exitApplication when object does not have BatchCursors --- .../main/java/com/genexus/GXProcedure.java | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/java/src/main/java/com/genexus/GXProcedure.java b/java/src/main/java/com/genexus/GXProcedure.java index f405da731..176565c53 100644 --- a/java/src/main/java/com/genexus/GXProcedure.java +++ b/java/src/main/java/com/genexus/GXProcedure.java @@ -135,15 +135,30 @@ protected boolean isRemoteProcedure() { return Application.isRemoteProcedure(context, remoteHandle, location); } - + protected boolean batchCursorHolder(){ return false;} + protected void exitApp() + { + exitApplication(batchCursorHolder()); + } + /** + * @deprecated use exitApp() + * */ protected void exitApplication() + { + exitApplication(true); + } + private void exitApplication(boolean flushBuffers) { if(dbgInfo != null && Application.realMainProgram == this) dbgInfo.onExit(); - try - { - Application.getConnectionManager().flushBuffers(remoteHandle, this); - }catch(Exception exception){ ; } + + if (flushBuffers) { + try { + Application.getConnectionManager().flushBuffers(remoteHandle, this); + } catch (Exception exception) { + ; + } + } if(disconnectUserAtCleanup) { try From 7a06aa5e68bdc82393babf81e937f5f8628f3242 Mon Sep 17 00:00:00 2001 From: cmurialdo Date: Fri, 9 Apr 2021 15:55:35 -0300 Subject: [PATCH 2/3] Revert "Avoid scanning batchCursors at exitApplication when object does not have BatchCursors" This reverts commit bc9f8dee7b616287f33f0bc91797e52380165286. --- .../main/java/com/genexus/GXProcedure.java | 25 ++++--------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/java/src/main/java/com/genexus/GXProcedure.java b/java/src/main/java/com/genexus/GXProcedure.java index 176565c53..f405da731 100644 --- a/java/src/main/java/com/genexus/GXProcedure.java +++ b/java/src/main/java/com/genexus/GXProcedure.java @@ -135,30 +135,15 @@ protected boolean isRemoteProcedure() { return Application.isRemoteProcedure(context, remoteHandle, location); } - protected boolean batchCursorHolder(){ return false;} - protected void exitApp() - { - exitApplication(batchCursorHolder()); - } - /** - * @deprecated use exitApp() - * */ + protected void exitApplication() - { - exitApplication(true); - } - private void exitApplication(boolean flushBuffers) { if(dbgInfo != null && Application.realMainProgram == this) dbgInfo.onExit(); - - if (flushBuffers) { - try { - Application.getConnectionManager().flushBuffers(remoteHandle, this); - } catch (Exception exception) { - ; - } - } + try + { + Application.getConnectionManager().flushBuffers(remoteHandle, this); + }catch(Exception exception){ ; } if(disconnectUserAtCleanup) { try From 11c40170f48e0dfa3fbd3b41570845a09ae22e2c Mon Sep 17 00:00:00 2001 From: cmurialdo Date: Fri, 9 Apr 2021 16:00:29 -0300 Subject: [PATCH 3/3] Do not call flushBuffers on exitApplication if object does not have batchCursors --- .../main/java/com/genexus/GXProcedure.java | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/java/src/main/java/com/genexus/GXProcedure.java b/java/src/main/java/com/genexus/GXProcedure.java index f405da731..176565c53 100644 --- a/java/src/main/java/com/genexus/GXProcedure.java +++ b/java/src/main/java/com/genexus/GXProcedure.java @@ -135,15 +135,30 @@ protected boolean isRemoteProcedure() { return Application.isRemoteProcedure(context, remoteHandle, location); } - + protected boolean batchCursorHolder(){ return false;} + protected void exitApp() + { + exitApplication(batchCursorHolder()); + } + /** + * @deprecated use exitApp() + * */ protected void exitApplication() + { + exitApplication(true); + } + private void exitApplication(boolean flushBuffers) { if(dbgInfo != null && Application.realMainProgram == this) dbgInfo.onExit(); - try - { - Application.getConnectionManager().flushBuffers(remoteHandle, this); - }catch(Exception exception){ ; } + + if (flushBuffers) { + try { + Application.getConnectionManager().flushBuffers(remoteHandle, this); + } catch (Exception exception) { + ; + } + } if(disconnectUserAtCleanup) { try