約我在我的公司開發的應用的性能提升有過會談。此應用程序包含執行大量xml解析的計劃任務。在某個小時內,當很多此類任務被觸發時,應用程序變得很慢。我一直在查看在某個高峯時間收集的線程轉儲,以查看可能會發生什麼成爲問題..但是,對於這種練習的新手,我無法理解它。下面是線程轉儲的摘錄。線程等待監視器
"JMSThread(5)-7635" daemon prio=10 tid=0x000000004fb5b800 nid=0x71e in Object.wait() [0x0000000048de8000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00002aaabf41fe38> (a java.lang.Object)
at EDU.oswego.cs.dl.util.concurrent.BoundedLinkedQueue.poll(BoundedLinkedQueue.java:253)
- locked <0x00002aaabf41fe38> (a java.lang.Object)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(PooledExecutor.java:723)
at org.jboss.util.threadpool.MinPooledExecutor.getTask(MinPooledExecutor.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:747)
at java.lang.Thread.run(Thread.java:619)
Locked ownable synchronizers:
- None
JMSThread(5)-7634" daemon prio=10 tid=0x000000004ed5c800 nid=0x716 in Object.wait() [0x0000000044eb2000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00002aaabf41fe38> (a java.lang.Object)
at EDU.oswego.cs.dl.util.concurrent.BoundedLinkedQueue.poll(BoundedLinkedQueue.java:253)
- locked <0x00002aaabf41fe38> (a java.lang.Object)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(PooledExecutor.java:723)
at org.jboss.util.threadpool.MinPooledExecutor.getTask(MinPooledExecutor.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:747)
at java.lang.Thread.run(Thread.java:619)
Locked ownable synchronizers:
- None
有幾個這樣的條目鎖定和等待在同一個對象上。任何人都可以幫我理解他們的意思嗎?這是否表明有任何問題?
這些MDB在JMS隊列上偵聽的線程實例嗎?(是的,我的應用程序將請求放入JMS隊列中進行異步處理) – wantobegeek