[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Test cases take a long time

sergeypk do-not-reply at jboss.com
Sun Mar 18 13:44:45 EDT 2007


The problem goes away on JDK 1.5 (I used JDK 1.6 originally). I've enabled logs and found that this is what happens:

1. First 300 open/close pairs proceed without any delay.

It seems that JBoss Remoting tries to pool threads processing connections and 300 is the thread pool size. There seems to be some kind of a leak here in that the sockets are not closed when JBoss Messaging is done with the connections. I don't know yet whether Messaging or Remoting is responsible for it.

2. After the first 300 connections have been established, the thread pool is full, thus the 301st createConnection call blocks.

3. After 1 minute has passed, JRE 1.5 runs finalizers that clean up the resources, freeing the 300 threads and allowing the test to proceed for the next 300 connections.

JRE 1.6 does not run finalizers at this point (don't know the reason), thus under JRE 1.6 the test hangs indefinitely.

Thus there are three one-minute pauses during the test (after the 300th, 600th, and 900th iteration) on JDK 1.5, leading to the 3,5 minutes running time.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4029117#4029117

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4029117



More information about the jboss-dev-forums mailing list