The deactiviation of an object causes Thread creation in AOM.remove. Would it be possible to use a thread pool instead of creating new threads? A possible solution could be to have the RequestController provide a notification mechanism (instead of a thread waiting on object completion) and have the notification request work from the thread pool. The attached patch uses a threadpool to prevent the thread creation but I don't believe it is the best solution.
Created attachment 90 [details] example workaround
A possible issue with doing this is that when thread pool reaches the limit it will block which I think breaks the spec which says that deactivate should return immediately.
It has been a while since I looked at this code but, IIRC, the whole point of the thread/thread pool was to allow the deactivate call to return immediately. It allowed certain processing to be deferred until there were no references. I did implement the notification mechanism and this was much cleaner. The code has probably moved on since that was done but I could try and dig it out and update it.
Patch is available on 801 although still needs to be applied to CVS. *** This bug has been marked as a duplicate of bug 801 ***
Comment on attachment 90 [details] example workaround <a href="http://www.research-service.com/">research paper</a>
Comment on attachment 90 [details] example workaround [url=http://www.research-service.com/]research paper[/url]