You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Cyrille Le Clerc <cl...@xebia.fr> on 2010/02/15 22:58:31 UTC

[CXF-2676] call for patch review

   Dear all,

   I proposed a patch for [CXF-2676] "JMX
InstanceAlreadyExistsException under high load initialization". I made
a design choice that some may find a bit to pessimistic. However, the
impact of this pessimistic choice is limited to the initialization
phase and would not impact performances after.

Can you tell me if you see any problem with this choice. I also
proposed other design choices but I find them complex and with a
limited gain.

https://issues.apache.org/jira/browse/CXF-2676


Here is the description of the patch and the alternative scenarios :

Patch proposal : use an instance scope counterCreationLock
(java.util.concurrent.locks.ReentrantLock).
Pros : simple code
Cons : slightly pessimistic. Simultaneous initialization of many
clients and/or endpoints is not very efficient,

Other solutions :

* use a synchronized block on ObjectName.toString().intern() :
 ** understanding intern() is tricky :-(

* register counters at startup
 ** requires a lot of changes in the code :-(
 ** does not deal with hot activation of the ResponsetimeFeature :-(

Cyrille

Re: [CXF-2676] call for patch review

Posted by Daniel Kulp <dk...@apache.org>.
I'm definitely OK with this way of doing it.   Works for me.  :-)

Dan


On Mon February 15 2010 4:58:31 pm Cyrille Le Clerc wrote:
>    Dear all,
> 
>    I proposed a patch for [CXF-2676] "JMX
> InstanceAlreadyExistsException under high load initialization". I made
> a design choice that some may find a bit to pessimistic. However, the
> impact of this pessimistic choice is limited to the initialization
> phase and would not impact performances after.
> 
> Can you tell me if you see any problem with this choice. I also
> proposed other design choices but I find them complex and with a
> limited gain.
> 
> https://issues.apache.org/jira/browse/CXF-2676
> 
> 
> Here is the description of the patch and the alternative scenarios :
> 
> Patch proposal : use an instance scope counterCreationLock
> (java.util.concurrent.locks.ReentrantLock).
> Pros : simple code
> Cons : slightly pessimistic. Simultaneous initialization of many
> clients and/or endpoints is not very efficient,
> 
> Other solutions :
> 
> * use a synchronized block on ObjectName.toString().intern() :
>  ** understanding intern() is tricky :-(
> 
> * register counters at startup
>  ** requires a lot of changes in the code :-(
>  ** does not deal with hot activation of the ResponsetimeFeature :-(
> 
> Cyrille

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog