You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "tim mcnamara (JIRA)" <ji...@apache.org> on 2008/11/18 11:39:05 UTC

[jira] Created: (CAMEL-1098) multicast and file consumer using managed threads?

multicast and file consumer using managed threads?
--------------------------------------------------

                 Key: CAMEL-1098
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 1.4.0
            Reporter: tim mcnamara
            Priority: Blocker
             Fix For: 2.0.0


Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "tim mcnamara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47818#action_47818 ] 

tim mcnamara commented on CAMEL-1098:
-------------------------------------

I do not think there is a need, I was able to accomplish the adaptor with a Spring proxy.  something like this:

{code:title=Spring Proxied WorkManager}
<bean id="workManagerTaskExecutor" class="org.springframework.jca.work.glassfish.GlassFishWorkManagerTaskExecutor"/>

<bean id="taskExecutor" class="org.springframework.aop.framework.ProxyFactoryBean">
     <property name="proxyInterfaces" value="java.util.concurrent.Executor"/>
     <property name="target" ref="workManagerTaskExecutor"/>
     <property name="proxyTargetClass" value="true"/>
</bean>
{code}


> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Updated: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "tim mcnamara (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

tim mcnamara updated CAMEL-1098:
--------------------------------

    Attachment: multicast.patch

Patch for Multicast and Splitter processors

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>             Fix For: 2.0.0
>
>         Attachments: multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "tim mcnamara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47880#action_47880 ] 

tim mcnamara commented on CAMEL-1098:
-------------------------------------

The unfortunate issue here is that there is another API (Timer) that  
provides the equivalent to ScheduledExecutorService.  This API is  
significantly different to the Java SE concurrent equivalents that  
would make the previous approach of proxying the interfaces very  
difficult.  So for now, it looks like there is no clean way to use  
ScheduledExecutorService implementations in a managed environment.

Moving forward, my suggestion would be for Camel to have it's own  
abstraction, similar to Spring's TaskExecutor, that would allow for  
the configuration of thread management whether running in a managed  
container or not.

JSR 236 offers hope for the future.

Tim...




> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Assigned: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang reassigned CAMEL-1098:
-----------------------------------

    Assignee: Willem Jiang

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Resolved: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1098.
--------------------------------

    Resolution: Fixed

I created a new ticket for Timms suggestions of some sort of abstraction

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Updated: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "tim mcnamara (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

tim mcnamara updated CAMEL-1098:
--------------------------------

    Attachment: executor.patch

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>             Fix For: 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47821#action_47821 ] 

Claus Ibsen commented on CAMEL-1098:
------------------------------------

@tim

No not really. Just wanted to be sure we covered it when commiting the patch. This issue states its only about: multicast and file consumer.

Have you check the components such as:
- camel-spring
- camel-jms
as well?



> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47663#action_47663 ] 

Claus Ibsen commented on CAMEL-1098:
------------------------------------

Tim, we can *not* have dependency on any spring.jars in the camel-core. camel-core should be extremely lightweight and thus only requires commons-logging.jar.

I think if possible there should be a *option* on the multicast and splitter type to reference a TaskExecutor. I think we have this in some of the other types.

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>             Fix For: 2.0.0
>
>         Attachments: multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47799#action_47799 ] 

Willem Jiang commented on CAMEL-1098:
-------------------------------------

@ Tim
I means we could write a adapter for the TaskExecutor in camel-spring module , this adapter should implement the Executor.
In this way , we can use the Spring 2.x TaskExecutor directly in camel.
BTW TaskExecutor defines the exact same method signature with the JDK1.5's Executor.

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "tim mcnamara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47825#action_47825 ] 

tim mcnamara commented on CAMEL-1098:
-------------------------------------

I am a bit apprehensive at this point to make this solution public.  I  
had problems with the JBoss implementation, and it has not been tested  
on Webpshere or Weblogic.  I will complete my testing in order to  
validate the solution.






> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "tim mcnamara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47824#action_47824 ] 

tim mcnamara commented on CAMEL-1098:
-------------------------------------

The multicast and file components were merely examples, if running in  
a container, were using unmanaged threads.  In my humble opinion,  
CAMEL would need considerable re-factoring to be a good citizen when  
running in a container managed environment.  A quick code scan  
revealed quite a few areas that are spawning threads (DefaultComponent  
for example).






> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "tim mcnamara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47911#action_47911 ] 

tim mcnamara commented on CAMEL-1098:
-------------------------------------

Thank you Camel team for integrating my suggested changes.  

Claus, If you grant me (confluence user mcnamara) editing karma on the wiki, I can see about starting a Cookbook entry - something like "Camel in a J2EE Environment".

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>             Fix For: 1.5.1, 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Updated: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1098:
-------------------------------

    Fix Version/s: 1.5.1

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>             Fix For: 1.5.1, 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47837#action_47837 ] 

Claus Ibsen commented on CAMEL-1098:
------------------------------------

@tim. DefaultComponent uses a ScheduledExecutorService to as pool. 

So maybe it's possible to inject what the WorkManager has to offer as ScheduledExecutorService  using the setScheduledExecutorService  method.
However being able to set that globally for all components is something I can't see done easy. Maybe something we should consider to improve.

Does the WorkManager offer a ScheduledExecutorService?

Are there other areas with issues? Tim we are interested to improve and let Camel be a first class citizen.

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "tim mcnamara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47660#action_47660 ] 

tim mcnamara commented on CAMEL-1098:
-------------------------------------

Took a crack at modifying MulticastProcessor to use Spring's TaskExecutor abstraction.  By default, it will now use Spring's   ThreadPoolTaskExecutor with the same pool configuration as previous.   Splitter change was also required due to the dependency.  Necessary changes to the units tests were also done.  These changes have been integration tested in JBoss and Webpshere containers using the respective Work Manager's.

Patch is being submitted.

Tim...

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>             Fix For: 2.0.0
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47464#action_47464 ] 

Claus Ibsen commented on CAMEL-1098:
------------------------------------

We should also check if there are other components that has similar issue.

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Priority: Blocker
>             Fix For: 2.0.0
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "tim mcnamara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47770#action_47770 ] 

tim mcnamara commented on CAMEL-1098:
-------------------------------------

submitting patch for Executor re-factoring

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>             Fix For: 2.0.0
>
>         Attachments: multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Updated: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1098:
-------------------------------

    Affects Version/s: 1.5.0
             Priority: Major  (was: Blocker)

Lowering priority from blocker to major.

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>             Fix For: 2.0.0
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "tim mcnamara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47666#action_47666 ] 

tim mcnamara commented on CAMEL-1098:
-------------------------------------

I just checked the Spring 3.0 source, and indeed TaskExecutor is now implementing the Executor interface.  My suggestion is to modify multicast and splitter to use the Executor interface.  In the interim, for my own use, I can proxy the TaskExecutor with the Executor interface.

Tim...

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>             Fix For: 2.0.0
>
>         Attachments: multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47912#action_47912 ] 

Claus Ibsen commented on CAMEL-1098:
------------------------------------

@tim

I have granted you the karma

On this page there is a brief section about the wiki docu how to edit:
http://activemq.apache.org/camel/contributing.html

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>             Fix For: 1.5.1, 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47774#action_47774 ] 

Claus Ibsen commented on CAMEL-1098:
------------------------------------

Tim the patch looks great.

Do you mind checking in the camel code if we can change to Executor instead of ThreadPoolExecuter in other areas as well?
Check camel-spring in the components as well as it's kinda core also.

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>             Fix For: 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47807#action_47807 ] 

Willem Jiang commented on CAMEL-1098:
-------------------------------------

Now I'm thinking we could hack the Spring injector or something. 
If the property value is instance of TaskExecutor , we could turn it into an ExecutorAdapter.



> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "tim mcnamara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47820#action_47820 ] 

tim mcnamara commented on CAMEL-1098:
-------------------------------------

Claus, I did not find any other areas that were utilizing  
ThreadPoolExecutor.  Were there any specific components you had in mind?





> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "tim mcnamara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47664#action_47664 ] 

tim mcnamara commented on CAMEL-1098:
-------------------------------------

Yep, that makes a lot of sense.  Where would this option be set?  It would be trivial to create a SpringManagedMultiprocessor in the camel-spring module

Tim...

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>             Fix For: 2.0.0
>
>         Attachments: multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47665#action_47665 ] 

Claus Ibsen commented on CAMEL-1098:
------------------------------------

I think James or Hadrian should be in on this as they might have some ideas to this.

As the model objects is in camel-core we can't have any spring imports, and the TaskExecutor in spring is not using the java 1.5 concurrent library (to be 1.4 compatible). And we haven't pluggable DSL (yet, Hadrian have some ideas to this).

I guess using spring 3.0 that is jdk1.5+ it would be much easier to integrate as we can use the java.util.concurrent.Executor interface.

So we might need some tricks or good ideas to do it.

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>             Fix For: 2.0.0
>
>         Attachments: multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47703#action_47703 ] 

Willem Jiang commented on CAMEL-1098:
-------------------------------------

Basically we put the Spring related class into the camel-spring module. 
How about we implement the java 1.5's Excutor interface by using the Spring's TaskExecutor and let user configure it  with the Spring ?
In this way we could support the 2.x Spring's TaskExecutor in camel .

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>             Fix For: 2.0.0
>
>         Attachments: multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47822#action_47822 ] 

Claus Ibsen commented on CAMEL-1098:
------------------------------------

Hi

You workmanager spring proxy solution is very neat. I am wondering if you would mind creating a little wiki page about this?

Such as a new cookbook:
http://activemq.apache.org/camel/cookbook.html

Or a brief FAQ entry:
http://activemq.apache.org/camel/faq.html

> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>         Attachments: executor.patch, multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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


[jira] Commented: (CAMEL-1098) multicast and file consumer using managed threads?

Posted by "tim mcnamara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47713#action_47713 ] 

tim mcnamara commented on CAMEL-1098:
-------------------------------------

Spring's 2.x TaskExecutor does not implement Executor - it does in  
3.0.  Either way, it would be a worthwhile re-factoring.






> multicast and file consumer using managed threads?
> --------------------------------------------------
>
>                 Key: CAMEL-1098
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1098
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: tim mcnamara
>             Fix For: 2.0.0
>
>         Attachments: multicast.patch
>
>
> Running in a server managed environment, it is preferable to use managed threads when ever possible. Is it possible to have these components (and others that spawn threads) modified to use Spring's TaskExecutor abstraction (a la JmsComponent). If this is the case, we could configure the components to use the server's WorkManager API.

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