[ 
https://issues.apache.org/jira/browse/CODEC-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12533528
 ] 

Qingtian Wang commented on CODEC-55:
------------------------------------

>". The thread-unsafe dependencies/setups are invoked once during the object 
>instantiation, and subsequently, only the biz methods (such as >encode/decode) 
>are invoked during the entire life span of the instantiated object. " 
>
>Just to point out that this might not be sufficient.
>If a non-threadsafe method is invoked after construction, then different 
>threads may see differently configured versions of the same instance.

Yep, that's exactly the reason why some people don't like setter style 
dependency injection. 

Again if we look at the use case where it says ONLY biz methods (I should have 
said interface methods) are invoked after the instantiation, and if all 
interface methods are made thread safe as per this issue, it doesn't really 
matter in which style the DI is done at instantiation time.

> make all "business" method implementations of public API thread safe 
> ---------------------------------------------------------------------
>
>                 Key: CODEC-55
>                 URL: https://issues.apache.org/jira/browse/CODEC-55
>             Project: Commons Codec
>          Issue Type: Wish
>            Reporter: Qingtian Wang
>         Attachments: concurrentCodecs.diff, concurrentQDiff.diff, 
> urlcodec.patch
>
>
> Maybe most of the implementations are already thread safe. Just such that 
> codec can say so in general...

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

Reply via email to