Bug 777929 (SOA-458)

Summary: Quickstart helloworldtopicnotifier/ReceiveJMSMessage.java - wait loop pushes CPU to 100%
Product: [JBoss] JBoss Enterprise SOA Platform 4 Reporter: Len DiMaggio <ldimaggi>
Component: ExamplesAssignee: trev <tkirby>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2 GA   
Target Milestone: ---   
Target Release: 4.2 CP01   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-458
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
branch: https://svn.labs.jboss.com/labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/ Revision #18739
Last Closed: 2008-04-01 15:13:56 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:

Description Len DiMaggio 2008-03-06 19:23:19 UTC
project_key: SOA

The wait loop in helloworldtopicnotifier/ReceiveJMSMessage.java consists of: 

while (true) { } 

Which ties up the CPU. The other quickstarts ReceiveJMSMessage.java classes use a timeout/sleep to avoid this - Such as (from the notification, aggregator, others - quickstarts):

        while (true) { // loop until I'm killed
            try {
                Thread.sleep(500);
            } catch (InterruptedException e) {break;}
        }

Comment 1 Len DiMaggio 2008-03-07 16:47:56 UTC
[ldimaggi@ldimaggi helloworld_topic_notifier]$ svn commit
Sending        helloworld_topic_notifier/src/org/jboss/soa/esb/samples/quickstart/helloworldtopicnotifier/ReceiveJMSMessage.java
Transmitting file data .
Committed revision 18759.



Comment 2 Len DiMaggio 2008-04-01 15:13:56 UTC
Verified fixed in CP01