Bug 777929 (SOA-458) - Quickstart helloworldtopicnotifier/ReceiveJMSMessage.java - wait loop pushes CPU to 100%
Summary: Quickstart helloworldtopicnotifier/ReceiveJMSMessage.java - wait loop pushes ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-458
Product: JBoss Enterprise SOA Platform 4
Classification: JBoss
Component: Examples
Version: 4.2 GA
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.2 CP01
Assignee: trev
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-06 19:23 UTC by Len DiMaggio
Modified: 2008-04-01 15:13 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-458 0 None None None Never

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



Note You need to log in before you can comment on or make changes to this bug.