Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues

Bug 801

Summary: AOM_RemovalThread created for each object deactivation
Product: JacORB Reporter: Juergen Weber <juergen>
Component: POAAssignee: Gerald Brose <gerald.brose>
Status: RESOLVED FIXED    
Severity: normal CC: Kevin.Conner
Priority: P2    
Version: 2.3.0   
Hardware: PC   
OS: All   
Attachments: diff -u AOM.java.orig AOM.java

Description Juergen Weber 2007-08-29 11:31:15 UTC
Currently JacORB does each servant deactivation within a separate thread.
I think this was introduced as fix to bug 204. 

Unfortunately, for bigger numbers of servants, the thread creation and start
results in a huge performance penalty. We have an application that at one time
frees some 4000 servants, at this point the vm crawls, sometimes even gets out
of memory.
(http://lists.spline.inf.fu-berlin.de/pipermail/jacorb-developer/2007-August/009053.html)

I attach a patch that creates only one thread per POA. This thread waits on a
edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue. In the
remove method the servant data is put onto this queue.

Unfortunately my patch creates a core JacORB dependency on
backport-util-concurrent.jar. I could have used java.util.concurrent but this
creates a dependency on Java 1.5

I have looked for a queue implementation in JacORB core but I did not find one.
Comment 1 Juergen Weber 2007-08-29 11:32:38 UTC
Created attachment 321 [details]
diff -u AOM.java.orig AOM.java
Comment 2 Nick Cross 2008-11-13 17:10:24 UTC
*** Bug 527 has been marked as a duplicate of this bug. ***
Comment 3 Nick Cross 2009-12-07 08:49:55 UTC
Fix has been applied to CVS. As JacORB depends on JDK1.5 backport-util-concurrent is not required.