Hi,

In JobUtil.java there's the line:
currentThread.setName(oldName + "-" + job.getProperty(PROPERTY_JOB_QUEUE_NAME) 
+ "(" + job.getProperty(PROPERTY_JOB_TOPIC) + ")");

The problem with this is that by including in the name of the thread the name 
of the thread that launched it (oldName), we get threads with names that have 
the number of the thread in it.

If we have event A that upon completion launches 4 event B the thread names for 
event b are:
pool-2-thread-1-eventb.queue
pool-2-thread-1-eventb.queue
pool-2-thread-1-eventb.queue
pool-2-thread-1-eventb.queue

each of these are running in a separate thread and if upon completion of each 
of those, we launch 4 or more event C from the event B threads:
pool-2-thread-2-eventc.queue
pool-2-thread-2-eventc.queue
pool-2-thread-2-eventc.queue
pool-2-thread-2-eventc.queue
pool-2-thread-3-eventc.queue
pool-2-thread-3-eventc.queue
pool-2-thread-3-eventc.queue
pool-2-thread-3-eventc.queue
pool-2-thread-4-eventc.queue
pool-2-thread-4-eventc.queue
pool-2-thread-4-eventc.queue
pool-2-thread-4-eventc.queue
pool-2-thread-5-eventc.queue
pool-2-thread-5-eventc.queue
pool-2-thread-5-eventc.queue
pool-2-thread-5-eventc.queue

But in our jobs configuration we have it set so that we should only have 4 
event c jobs running at a time.

The way it works now our thread pool is quickly filled up and so we can no 
longer launch even event b until all of the event c are processed.

Is this by design? And I should just refactor and not launch events/jobs from 
other events/jobs?

Rob

Reply via email to