camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CAMEL-1644) Producer - Add scope for singleton to allow using non singleton producers to address thread safety
Date Mon, 25 May 2009 08:27:50 GMT

     [ https://issues.apache.org/activemq/browse/CAMEL-1644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen updated CAMEL-1644:
-------------------------------

    Attachment: CAMEL-1644.patch

First cut of a patch. Notice there are some changes in for the CAMEL-1641 as well.

> Producer - Add scope for singleton to allow using non singleton producers to address
thread safety
> --------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1644
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1644
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.0.0
>
>         Attachments: CAMEL-1644.patch
>
>
> See CAMEL-1641 that is a bug reported about the FTP producer not being thread safe for
concurrent usage.
> To address this we should consider supporting Producers to implement {{IsSingleton}}
and return {{false}} to indicate that a producer should not be cached in the {{ProducerCache}}.
> We should also introduce a {{ProducerCallback}} to allow safely usages of a producer
and letting Camel handle the correct resource management to
> - find the producer (singletons)
> - add to cache if needed
> - or create it
> - start it
> - invoke the callback
> - stop it for non singletons
> etc.
> In the future we can support a pool of non singleton producers as well and with this
callback users of this producer can safely use it without worrying how to get it from a pool
and how to safely return it back without leaking.

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


Mime
View raw message