Bug 777956 (SOA-486)

Summary: Quartz scheduling threads killed by exceptions
Product: [JBoss] JBoss Enterprise SOA Platform 4 Reporter: Len DiMaggio <ldimaggi>
Component: JBossESBAssignee: Jiri Pechanec <jpechane>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 4.2 GA   
Target Milestone: ---   
Target Release: 4.2 CP01   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-486
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-03 16:44:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
jboss-esb.xml
none
MyScheduledActionMsgComposer.java none

Description Len DiMaggio 2008-04-01 13:46:06 UTC
Date of First Response: 2008-04-02 04:56:27
project_key: SOA

Platform JIRA for project JIRA: JBESB-1631

Comment 2 Len DiMaggio 2008-04-01 13:46:59 UTC
Link: Added: This issue depends JBESB-1631


Comment 3 Kevin Conner 2008-04-02 08:56:27 UTC
Will get a test case for you.

Comment 4 Kevin Conner 2008-04-03 11:54:01 UTC
Attachment: Added: jboss-esb.xml


Comment 5 Kevin Conner 2008-04-03 11:54:24 UTC
Attachment: Added: MyScheduledActionMsgComposer.java


Comment 6 Kevin Conner 2008-04-03 12:01:26 UTC
Len, I have attached the modifications I made to the scheduled_services quickstart to reproduce this issue.  Hopefully you can get an idea from this for a better test :)

I modified the composer to selectively throw a RuntimeException/Error during the processing, in this case it attempts to break each thread in turn.

If it succeeds then the processing will eventually stop, if it has been fixed then you will see messages such as the following

"compose a message on DefaultQuartzScheduler_Worker-1 while looking for -9"

where the running worker thread number is lower than the one being searched for.

Comment 7 Jiri Pechanec 2008-04-03 14:34:27 UTC
I'll convert this testcase to fit our testing framework

Comment 8 Len DiMaggio 2008-04-03 16:44:48 UTC
This test does fail with the GA bits:

</my_scheduled_listener>
12:41:27,795 INFO  [STDOUT] throwing an error
12:41:27,795 ERROR [STDERR] Exception in thread "DefaultQuartzScheduler_Worker-0" 
12:41:27,795 ERROR [STDERR] java.lang.Error: Thrown Error
12:41:27,796 ERROR [STDERR]     at org.jboss.soa.esb.samples.quickstart.scheduler.MyScheduledActionMsgComposer.composeMessage(MyScheduledActionMsgComposer.java:52)
12:41:27,796 ERROR [STDERR]     at org.jboss.soa.esb.listeners.ScheduleListener.onSchedule(ScheduleListener.java:118)
12:41:27,796 ERROR [STDERR]     at org.jboss.soa.esb.schedule.ScheduleProvider$ESBScheduledJob.execute(ScheduleProvider.java:217)
12:41:27,796 ERROR [STDERR]     at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
12:41:27,796 ERROR [STDERR]     at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
12:41:27,972 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.

And runs with the CP01 bits.