You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Rajika Kumarasiri (JIRA)" <ji...@apache.org> on 2010/06/20 15:29:23 UTC

[jira] Created: (WSCOMMONS-548) Ability to suspend the JMS polling task for interested amount of time

Ability to suspend the JMS polling task for interested amount of time
---------------------------------------------------------------------

                 Key: WSCOMMONS-548
                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-548
             Project: WS-Commons
          Issue Type: Improvement
          Components: Transport
            Reporter: Rajika Kumarasiri
         Attachments: WSCOMMONS-548.patch

Currently the polling task of JMS transport will immediately re-try which I think we need to control over in some instance. So I have added a new parameter for the connection factory "transport.jms.TaskSuspendDuration" which can use to specify the time in millisecond that we need to suspend the current polling task. A negative or zero value will not suspend the task. 

Rajika 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WSCOMMONS-548) Ability to suspend the JMS polling task for interested amount of time

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSCOMMONS-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882968#action_12882968 ] 

Andreas Veithen commented on WSCOMMONS-548:
-------------------------------------------

The JMS transport has a thread pool that is grown automatically (up to some configurable limit) such that at any moment there is at least one thread ready to receive a message. The net effect of suspending these threads will therefore be that the JMS transport creates more threads. Therefore I don't understand the use case for this. I also don't understand how this could influence the behavior of the transport in a well defined way (it surely has an impact, but I'm not sure it is well defined).

> Ability to suspend the JMS polling task for interested amount of time
> ---------------------------------------------------------------------
>
>                 Key: WSCOMMONS-548
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-548
>             Project: WS-Commons
>          Issue Type: Improvement
>          Components: Transport
>            Reporter: Rajika Kumarasiri
>         Attachments: WSCOMMONS-548.patch
>
>
> Currently the polling task of JMS transport will immediately re-try which I think we need to control over in some instance. So I have added a new parameter for the connection factory "transport.jms.TaskSuspendDuration" which can use to specify the time in millisecond that we need to suspend the current polling task. A negative or zero value will not suspend the task. 
> Rajika 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WSCOMMONS-548) Ability to suspend the JMS polling task for interested amount of time

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSCOMMONS-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12894264#action_12894264 ] 

Andreas Veithen commented on WSCOMMONS-548:
-------------------------------------------

-1 to the change in its present form. Reasons:

* If the setting is only effective with a thread pool size of 1, then this should be enforced.
* There is no documentation (neither code nor user documentation) that clearly explains the purpose of this setting.
* It doesn't handle InterruptedException correctly [1].

[1] http://today.java.net/pub/a/today/2006/04/06/exception-handling-antipatterns.html#ignoringInterruptedException

> Ability to suspend the JMS polling task for interested amount of time
> ---------------------------------------------------------------------
>
>                 Key: WSCOMMONS-548
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-548
>             Project: WS-Commons
>          Issue Type: Improvement
>          Components: Transport
>            Reporter: Rajika Kumarasiri
>         Attachments: WSCOMMONS-548.patch
>
>
> Currently the polling task of JMS transport will immediately re-try which I think we need to control over in some instance. So I have added a new parameter for the connection factory "transport.jms.TaskSuspendDuration" which can use to specify the time in millisecond that we need to suspend the current polling task. A negative or zero value will not suspend the task. 
> Rajika 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WSCOMMONS-548) Ability to suspend the JMS polling task for interested amount of time

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSCOMMONS-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12894296#action_12894296 ] 

Hiranya Jayathilaka commented on WSCOMMONS-548:
-----------------------------------------------

> If the setting is only effective with a thread pool size of 1, then this should be enforced. 

IMV this parameter can be used to "slow down" the listener even with more than one thread. Being able to enforce an interval between two successive invocations of a worker is a useful feature IMO.

> There is no documentation (neither code nor user documentation) that clearly explains the purpose of this setting. 

That's true. We need to update the documentation. I believe Rajika will be more than happy to provide another patch with some documentation :)

> It doesn't handle InterruptedException correctly

Is this really needed? What can possibly interrupt a sleeping listener task? If it is the thread pool shutdown event, then I guess we can safely ignore that.



> Ability to suspend the JMS polling task for interested amount of time
> ---------------------------------------------------------------------
>
>                 Key: WSCOMMONS-548
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-548
>             Project: WS-Commons
>          Issue Type: Improvement
>          Components: Transport
>            Reporter: Rajika Kumarasiri
>         Attachments: WSCOMMONS-548.patch
>
>
> Currently the polling task of JMS transport will immediately re-try which I think we need to control over in some instance. So I have added a new parameter for the connection factory "transport.jms.TaskSuspendDuration" which can use to specify the time in millisecond that we need to suspend the current polling task. A negative or zero value will not suspend the task. 
> Rajika 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WSCOMMONS-548) Ability to suspend the JMS polling task for interested amount of time

Posted by "Rajika Kumarasiri (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSCOMMONS-548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rajika Kumarasiri updated WSCOMMONS-548:
----------------------------------------

    Attachment: WSCOMMONS-548.patch

A small patch to for the issue. 

Rajika

> Ability to suspend the JMS polling task for interested amount of time
> ---------------------------------------------------------------------
>
>                 Key: WSCOMMONS-548
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-548
>             Project: WS-Commons
>          Issue Type: Improvement
>          Components: Transport
>            Reporter: Rajika Kumarasiri
>         Attachments: WSCOMMONS-548.patch
>
>
> Currently the polling task of JMS transport will immediately re-try which I think we need to control over in some instance. So I have added a new parameter for the connection factory "transport.jms.TaskSuspendDuration" which can use to specify the time in millisecond that we need to suspend the current polling task. A negative or zero value will not suspend the task. 
> Rajika 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WSCOMMONS-548) Ability to suspend the JMS polling task for interested amount of time

Posted by "Rajika Kumarasiri (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSCOMMONS-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12893501#action_12893501 ] 

Rajika Kumarasiri commented on WSCOMMONS-548:
---------------------------------------------

The idea with the patch is to add some throttling mechanism to the JMS transport listener. We'll have to set the thread pool size to 1 and define a suspend duration time for that. 

Rajika 

> Ability to suspend the JMS polling task for interested amount of time
> ---------------------------------------------------------------------
>
>                 Key: WSCOMMONS-548
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-548
>             Project: WS-Commons
>          Issue Type: Improvement
>          Components: Transport
>            Reporter: Rajika Kumarasiri
>         Attachments: WSCOMMONS-548.patch
>
>
> Currently the polling task of JMS transport will immediately re-try which I think we need to control over in some instance. So I have added a new parameter for the connection factory "transport.jms.TaskSuspendDuration" which can use to specify the time in millisecond that we need to suspend the current polling task. A negative or zero value will not suspend the task. 
> Rajika 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WSCOMMONS-548) Ability to suspend the JMS polling task for interested amount of time

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSCOMMONS-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12893505#action_12893505 ] 

Hiranya Jayathilaka commented on WSCOMMONS-548:
-----------------------------------------------

This improvements provides a simple but effective was of throttling messages at the JMS transport level. +1 to the change.

> Ability to suspend the JMS polling task for interested amount of time
> ---------------------------------------------------------------------
>
>                 Key: WSCOMMONS-548
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-548
>             Project: WS-Commons
>          Issue Type: Improvement
>          Components: Transport
>            Reporter: Rajika Kumarasiri
>         Attachments: WSCOMMONS-548.patch
>
>
> Currently the polling task of JMS transport will immediately re-try which I think we need to control over in some instance. So I have added a new parameter for the connection factory "transport.jms.TaskSuspendDuration" which can use to specify the time in millisecond that we need to suspend the current polling task. A negative or zero value will not suspend the task. 
> Rajika 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.