Re: IllegalStateException in _beginTransaction()
Re: IllegalStateException in _beginTransaction()
- Subject: Re: IllegalStateException in _beginTransaction()
- From: Paul Hoadley <email@hidden>
- Date: Tue, 01 Mar 2011 16:08:58 +1030
Hi Chuck,
On 01/03/2011, at 3:32 PM, Chuck Hill wrote:
> On Feb 28, 2011, at 8:51 PM, Paul Hoadley wrote:
>
>> On 01/03/2011, at 4:38 AM, Chuck Hill wrote:
>>
>>> It is possible that some prior transaction had an error and left the DBC transaction open?
>>
>> Actually, yes, I think I can see a couple of candidates. A user can initiate a long-running background task from the page in question, which does touch EOF to create some data for download relating to a chosen EO. (I'm reasonably sure those background tasks are well-behaved, in that they use their own ERXEC to do their work, and the EO is passed in using its EOGlobalID.)
>
> Do you create an EOF stack for these long running tasks? I would suggest doing that.
I'm not currently, but I'll change it to do so. Tell me, is the difference between just doing ERXEC.newEditingContext(new EOObjectStoreCoordinator()) and using an OSC pool approach just that the latter ensures an upper limit on how many stacks the app creates? Or are there significant setup/teardown costs involved in the former every time a user starts a background task? (Or both?)
>> 2. I've been tuning the RAM available to the instance, and sometimes it runs short. Just after the IllegalStateException (which presumably rules it out as a cause) there's an OutOfMemoryError when the JVM ran out of heap space.
>>
>> Are either of these potential causes?
>
> Yes! Run out of memory and all bets are off. All kinds of things can happen in this case, the JVM is often insane. Likely the IllegalStateException resulted from running out of memory.
>
> Where possible (sometimes it can't recover enough memory to even properly throw the exception) I try to catch this in the Application's handleException and then System.getRuntime.exit(1)
Thanks. So the fact that the OutOfMemoryError was logged _after_ the IllegalStateException doesn't preclude it from being the cause?
--
Paul.
http://logicsquad.net/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden