Skip to content

Commit f0857ce

Browse files
Exit application flush batch cursors (#357)
* Avoid scanning batchCursors at exitApplication when object does not have BatchCursors * Revert "Avoid scanning batchCursors at exitApplication when object does not have BatchCursors" This reverts commit bc9f8de. * Do not call flushBuffers on exitApplication if object does not have batchCursors (cherry picked from commit 2d46b7d)
1 parent 9373f46 commit f0857ce

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

java/src/main/java/com/genexus/GXProcedure.java

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,30 @@ protected boolean isRemoteProcedure()
135135
{
136136
return Application.isRemoteProcedure(context, remoteHandle, location);
137137
}
138-
138+
protected boolean batchCursorHolder(){ return false;}
139+
protected void exitApp()
140+
{
141+
exitApplication(batchCursorHolder());
142+
}
143+
/**
144+
* @deprecated use exitApp()
145+
* */
139146
protected void exitApplication()
147+
{
148+
exitApplication(true);
149+
}
150+
private void exitApplication(boolean flushBuffers)
140151
{
141152
if(dbgInfo != null && Application.realMainProgram == this)
142153
dbgInfo.onExit();
143-
try
144-
{
145-
Application.getConnectionManager().flushBuffers(remoteHandle, this);
146-
}catch(Exception exception){ ; }
154+
155+
if (flushBuffers) {
156+
try {
157+
Application.getConnectionManager().flushBuffers(remoteHandle, this);
158+
} catch (Exception exception) {
159+
;
160+
}
161+
}
147162
if(disconnectUserAtCleanup)
148163
{
149164
try

0 commit comments

Comments
 (0)