Bug 777927 (SOA-456) - Infinite loop missing from notifications quickstart - client that reads from a topic
Summary: Infinite loop missing from notifications quickstart - client that reads from ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-456
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-05 21:55 UTC by Len DiMaggio
Modified: 2008-04-01 15:03 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
/opt/GA/soa-4.2.0.GA.zip /opt/GA/standalone-soa-4.2.0.GA.zip
Last Closed: 2008-04-01 15:03:46 UTC
Type: Bug


Attachments (Terms of Use)


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

Description Len DiMaggio 2008-03-05 21:55:19 UTC
project_key: SOA

The answer is to add "while (true) {  }" at line 120:

	    // make the connection active 
	    topicHelper.conn.start() ;

    	while (true) {  }

	    // TextListener will now pull messages ad infinitum
	    // shutdown hook will be called at Ctrl-C

Without this change - the "ant receive-from-queue" target runs once and exits.

Comment 1 Len DiMaggio 2008-03-05 21:58:27 UTC
Link: Added: This issue related JBESB-1580


Comment 2 Len DiMaggio 2008-03-06 18:11:45 UTC
SOA-456

Committing fix for: http://jira.jboss.com/jira/browse/SOA-456

To branch: https://svn.labs.jboss.com/labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/

And cleaned up deprecated code - ex. esbMessage.getBody().setByteArray(args[2].getBytes());

[ldimaggi@ldimaggi notifications]$ svn commit
Sending        notifications/src/org/jboss/soa/esb/samples/quickstart/notifications/MyJMSListenerAction.java
Sending        notifications/src/org/jboss/soa/esb/samples/quickstart/notifications/test/ReceiveJMSMessageFromTopic.java
Sending        notifications/src/org/jboss/soa/esb/samples/quickstart/notifications/test/SendEsbMessage.java
Transmitting file data ...
Committed revision 18739.


Comment 3 Len DiMaggio 2008-03-06 19:22:57 UTC
The actual change committed was:

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



Comment 4 Len DiMaggio 2008-04-01 15:03:46 UTC
Verified fixed in CP01


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