Closed GoogleCodeExporter closed 3 years ago
You did good detective work, and indeed found the issue.
Handlers stay in memory -- this allows for better performance -- and this
includes their entire global space. So indeed the context is sealed off against
changes. I think what should happen in this case is a silent failure -- it's OK
if the document was not marked as executed, because it would not normally be
executed again.
Until this is fixed, there might be several workarounds available -- this
simplest may be to wrap the executeOnce with a try/catch.
Original comment by tal.liron
on 19 Mar 2012 at 7:17
Thanks Tal -
That handlers stay in memory is important to know.
The problem forced me to take a good look at my code and refactor it.
Earlier I was constantly testing for the existence of a connection
pool and if not found, creating a lock and adding the pool to the
application globals.
I now create the pool during startup and then get and free connections
from the pool as needed. This enabled me to lose an executeOnce from
within several libraries. And I just went back to execute in my
handler.
Thanks again - recognizing you are busy with v2 so - till then!
Original comment by tgloc...@gmail.com
on 19 Mar 2012 at 8:15
Original issue reported on code.google.com by
tgloc...@gmail.com
on 9 Mar 2012 at 10:50