[
https://issues.apache.org/jira/browse/CAMEL-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13560693#comment-13560693
]
Denis Delangle commented on CAMEL-5994:
---------------------------------------
I made a pull request based on this patch and with a testcase
https://github.com/apache/camel/pull/7. This patch solved my problem (described
in CAMEL-5993)
> CamelJob implementation rely on some inconsistent endpoints LRU cache - Camel
> endpoints may not be called on quartz fire after some days of uptime
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5994
> URL: https://issues.apache.org/jira/browse/CAMEL-5994
> Project: Camel
> Issue Type: Bug
> Components: camel-quartz
> Affects Versions: 2.9.5, 2.10.3
> Environment: Quartz is in deployed in cluster mode.
> Reporter: Alexis Kinsella
> Priority: Critical
> Attachments: CamelJob.java
>
>
> CamelJobs rely on some endpoints LRU cache from camel context. If i'm not
> wrong, since LRU Cache relies on SoftReferences, Garbage Collector can decide
> to evict some entries and especially QuartzEndpoints.
> It happens that sometimes endpoints evicted from LRU Caches are
> QuartzEndpoints. Since QuartzEnpoints are searched from CamelJob in LRU
> cache, they are not reachable anymore.
> The side effect, is that CamelJob isntance initializes a new QuartzEndpoint,
> but loadbalancer is not initialized since it is initialized from
> QuartzConsumer.
> The result is that quartz triggers jobs that instanciate Quartz endpoints
> with unintialized load balancers which are unable to call processor from the
> routes associated.
> I have joined a fix that rely on the search of QuartzEndpoints from
> initalized routes of Camel context.
> Fundamentally, the search of endpoints should not rely on endpoints LRU
> cache. It is a broken design.
> Hope it helps.
> By the way, there are other issues related to QuartzEndpoint load balancer
> initalization: If quartz starts before startup of Camel routes you will have
> the same issue: Correctly initialized QuartzEndpoints are not in LRU cache
> since Camel has not started routes (and so endpoints and consumers). Quartz
> will trigger job, and camel job will search for QuartzEndpoint and put it in
> LRUCache with uninitialized load balancer.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira