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

Cyrille Le Clerc updated CXF-2676:
----------------------------------

    Attachment: CXF-2676.patch

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}} :-(

> JMX InstanceAlreadyExistsException under high load initialization
> -----------------------------------------------------------------
>
>                 Key: CXF-2676
>                 URL: https://issues.apache.org/jira/browse/CXF-2676
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2.6
>            Reporter: Cyrille Le Clerc
>            Assignee: Cyrille Le Clerc
>         Attachments: CXF-2676.patch
>
>
> Under high load / burst startups with ResponseTimeFeature enabled , CXF 
> clients and endpoints can cause {{InstanceAlreadyExistsException}}.
> {noformat:title=Sample of InstanceAlreadyExistsException}
> 2010/02/15 22:12:08,632  WARN [http-8080-20] 
> org.apache.cxf.management.counters.CounterRepository - 
>    Can't register counter with object name 
> org.apache.cxf:bus.id=my-bus,type=Performance.Counter.Server,service="{http://ws.example.com/}myService",port="myServiceSOAP";.
>  
>    javax.management.InstanceAlreadyExistsException: 
> org.apache.cxf:bus.id=my-bus,type=Performance.Counter.Server,service="{http://ws.example.com/}myService",port="myServiceSOAP";
> {noformat}
> Before CXF-2675 , the message was 
> {noformat}
> 2010/02/15 22:12:08,632  WARN [http-8080-20] 
> org.apache.cxf.management.counters.CounterRepository - Can't register counter 
> with object name {0}. {1}
> {noformat}

-- 
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