You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Michael Reichenbach (JIRA)" <ji...@apache.org> on 2011/03/02 15:14:36 UTC
[jira] Issue Comment Edited: (OFBIZ-3987) infinite loop when
instantiate the delegator using distributetCacheClear
[ https://issues.apache.org/jira/browse/OFBIZ-3987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001351#comment-13001351 ]
Michael Reichenbach edited comment on OFBIZ-3987 at 3/2/11 2:13 PM:
--------------------------------------------------------------------
I can't see any side effects which should occur with the missing {{getContextClassLoader}} method.
Anyway, the fix seems to work for me, but I also would change the following, to that {{useDistributedCacheClear()}} will be checked only once:
{code:java}
public void initDistributedCacheClear() {
if (!getDelegatorInfo().useDistributedCacheClear || this.distributedCacheClear != null) {
return;
}
ClassLoader loader = Thread.currentThread().getContextClassLoader();
// ...
{code}
Edit: I removed the logging because this method is called more often than I thought.
was (Author: reichemi):
I can't see any side effects which should occur with the missing {{getContextClassLoader}} method.
Anyway, the fix seems to work for me, but I also would change the following, to that {{useDistributedCacheClear()}} will be checked only once:
{code:java}
public void initDistributedCacheClear() {
if (!getDelegatorInfo().useDistributedCacheClear) {
Debug.logInfo("Distributed Cache Clear System disabled for delegator [" + delegatorFullName + "]", module);
return;
}
if (this.distributedCacheClear != null) {
Debug.logVerbose("Distributed Cache Clear System already initialized for delegator [" + delegatorFullName + "]", module);
return;
}
ClassLoader loader = Thread.currentThread().getContextClassLoader();
// ...
{code}
> infinite loop when instantiate the delegator using distributetCacheClear
> -------------------------------------------------------------------------
>
> Key: OFBIZ-3987
> URL: https://issues.apache.org/jira/browse/OFBIZ-3987
> Project: OFBiz
> Issue Type: Improvement
> Components: ALL COMPONENTS
> Affects Versions: SVN trunk
> Reporter: Sascha Rodekamp
> Fix For: SVN trunk
>
> Attachments: OFBIZ-3987_DelegatorFactory.java.patch
>
>
> Hi Guys,
> we found an infinite loop when instantiate the delegator. This happens when you use the distributetCacheClear .
> I moved the init of the dist cache clear to a separate method and call it in the factory which resolves the loop issue.
> Have a good day
> Sascha
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira