[ 
https://issues.apache.org/activemq/browse/CAMEL-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59321#action_59321
 ] 

Hadrian Zbarcea commented on CAMEL-2716:
----------------------------------------

r943644 - first cut. 

Also added a way to reset the counters to have predictable ObjectNames during 
tests. DefaultNodeIdFactory.resetAllCounters() could lead to name conflicts if 
used without care, reason why I made it protected, so it cannot be invoked 
directly.

> Incomplete cleanup of jmx mbeans after context stop
> ---------------------------------------------------
>
>                 Key: CAMEL-2716
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2716
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>            Reporter: Hadrian Zbarcea
>            Assignee: Hadrian Zbarcea
>
> There is a fair amount of cleanup on context stop, but it is incomplete. Most 
> of it has to do with JMX and if one creates and starts a new CamelContext she 
> may end up with managed objects pointing nowhere or have duplicates or other 
> minor side-effects. One of the nasty side effects is that we are pretty much 
> forced to use "<forkMode>pertest</forkMode>" in our surefire plugin 
> configuration, ensuring a clean slate for every test.
> For long running apps in which you may have multiple CamelContext running at 
> various times during the lifetime of the application we must properly cleanup 
> when stopping the context. I have a series of patches fixing that which I 
> hope to finish before 2.3. Once we're comfortable and tested with multiple 
> jdk implementations and versions, I'd change the forkMode to "once". In my 
> local copy this reduces the test time in core from 40+ mins to under 15 mins. 
> Since interactions between tests is still possible and might lead us on a 
> wild-goose we could add another profile that uses the safer yet time 
> consuming "pertest" forkMode.

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