I have been using Http_Job forever with B4J/A/i to work with various AWS services (S3, Rekognition, Translate etc)- but always (in the case of B4J) with UI apps.
I am now playing with ABMaterial that requires use of a non-UI app to accommodate jServer.
When I run this app in Debug mode it all works fine.
When I run it in Release mode it fails - generally completely but sometimes intermittently.
After annoying the bejesus out of AWS technical support I started to suspect some timing problem - well some would have fallen to this immediately but I'm slow on the uptake.
After digging around with Log statements all over the place I found that if I modify Http_Job with:
Where ever CallSubDelayed2(Http_Utils2_Service, "SubmitJob", Me) appears then the problem goes away.
The one exception to this is don't do it in the Complete sub - get an infinite loop.
Am I missing something? Is there a more elegant solution? Any relevant thoughts?
I am now playing with ABMaterial that requires use of a non-UI app to accommodate jServer.
When I run this app in Debug mode it all works fine.
When I run it in Release mode it fails - generally completely but sometimes intermittently.
After annoying the bejesus out of AWS technical support I started to suspect some timing problem - well some would have fallen to this immediately but I'm slow on the uptake.
After digging around with Log statements all over the place I found that if I modify Http_Job with:
B4X:
'<<jk
#If B4J
Sleep(1)
#End If
'<<jk
CallSubDelayed2(Http_Utils2_Service, "SubmitJob", Me)
Where ever CallSubDelayed2(Http_Utils2_Service, "SubmitJob", Me) appears then the problem goes away.
The one exception to this is don't do it in the Complete sub - get an infinite loop.
Am I missing something? Is there a more elegant solution? Any relevant thoughts?
Last edited: