Effective October 27, 2012, online and email support for FuseSource products will move to Red Hat support channels. For more information, please see the JIRA Migration to Red Hat FAQ.
As of October 27th, please open all new issues in the Red Hat Customer Portal .
Issue Details (XML | Word | Printable)

Key: SF-340
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Willem Jiang
Reporter: Willem Jiang
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
FUSE Services Framework

CXF JMSContinuation leaks threads

Created: 28/Mar/11 01:50 AM   Updated: 11/Apr/11 04:48 PM
Component/s: None
Affects Version/s: 2.2.10-fuse-00-00, 2.2.11-fuse-00-00, 2.3.1-fuse-01-00 , 2.3.2-fuse-00-00, 2.3.3-fuse-00-00
Fix Version/s: 2.2.12-fuse-00-00, 2.3.3-fuse-01-15

External Issue URL: https://issues.apache.org/jira/browse/CXF-3426


 Description  « Hide
JMSContinuation contains this method:
protected void createTimerTask(long timeout) {
        timer = new Timer();
        timer.schedule(new TimerTask() {
            public void run() {
                synchronized (JMSContinuation.this) { 
                    if (isPending) {
                        doResume();
                    }
                }
            }
        }, timeout);
    }

The 'if' statement should be changed to:

if (isPending) {
            cancelTimerTask();
            doResume();
}

The current impl causes cancel() not to be called on the Timer instance if timeout is triggered. This causes threads created by Timer instances to be leaked.

Please note: as stated above - the leak is only observable when timeouts are triggered on these continuations. If no timeouts are triggered and the orginary resume() method is called, this class does nto leak threads.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Willem Jiang added a comment - 01/Apr/11 09:28 AM
The apache patch are synced to 2.3.x-fuse and 2.2.x-fuse branch.