New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed issues with distributed cache (see LDEV-3279) #1
Conversation
I just patched another bug in which the RMI URLs were being cast to lowercase, which prevented manual distributed RMI replication from working if the cache name had uppercase characters in the name. |
28cda44
to
7f68518
Compare
* RMI URLs where incorrectly being cast to lowercase, which means manual distribution only worked if the cache name was also in lowercase Fixed issues with distributed cache (see LDEV-3279) * Added EHCacheClassLoader to resolve issues with loading RMI classes * The <cacheManagerEventListenerFactory /> settings are now always honored (previously the properties were only populated when set to "manual" distribution mode, but it's need for "automatic" mode in order to control the ports being used) * Changed default ehCache distribution configuration for optimal performance by disable "via Copy" and "put" operations * Refactored code so serialization only happens when replicating objects using the "via copy" options (other distributed cache options just mark the objects for removal, so serialization is not required) * Fixed bug in TypeUtil.toJVM() which caused components to not be fully serialized (it was being treated as a struct and missing properties/methods extended from other components)
@michaeloffner Anything you need from me on this? |
source/java/src/org/lucee/extension/cache/eh/EHCacheSupport.java
Outdated
Show resolved
Hide resolved
source/java/src/org/lucee/extension/cache/eh/EHCacheSupport.java
Outdated
Show resolved
Hide resolved
* Migrated getLogger() results to be cached * Allowed getLogger() to specify the config object to use * Added exception to error logging
Anything else you need from me regarding this patch? |
1 similar comment
Anything else you need from me regarding this patch? |
I wanted to follow up on this again, so it doesn't get lost in the shuffle of managing this large project (and my daily workload). |
* Fixed issue in EHCacheClassLoader.loadClass() workflow where it was logging classes not found as exceptions, which could generate false error logs in libraries like Logback & Log4j, which use dynamic class loaders. * Fixed bug in searchFelixBundleClasses() where it was logging classes being found when they were not actually found.
source/java/src/org/lucee/extension/cache/eh/util/EHCacheClassLoader.java
Outdated
Show resolved
Hide resolved
source/java/src/org/lucee/extension/cache/eh/util/EHCacheClassLoader.java
Outdated
Show resolved
Hide resolved
Method m = clazz.getMethod("getEngine", new Class[] { Config.class }); | ||
return (CFMLEngine) m.invoke(null, this.config); | ||
} catch (Exception e) { | ||
e.printStackTrace(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not simply write this to the console, throw it or log it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, left over debug code that I didn't remove. I've replaced it with a comment that it's safe to ignore the exception.
source/java/src/org/lucee/extension/cache/eh/util/EHCacheClassLoader.java
Show resolved
Hide resolved
source/java/src/org/lucee/extension/cache/eh/util/EHCacheClassLoader.java
Show resolved
Hide resolved
source/java/src/org/lucee/extension/cache/eh/util/TypeUtil.java
Outdated
Show resolved
Hide resolved
source/java/src/org/lucee/extension/cache/eh/util/TypeUtil.java
Outdated
Show resolved
Hide resolved
* Fixed searchFelixBundleClasses() to synchronize by class * Removed unnecessary getCFMLEngine() method
I believe all the required changes have been made. Let me know if you need anything more from me. |
https://luceeserver.atlassian.net/browse/LDEV-3279
IMPORTANT — The
EHCacheClassLoader
uses reflection to access theisFrameworkBundle
method onlucee.runtime.osgi.OSGiUtil
. If that method was made public, we could avoid using reflection. @michaeloffner stated "we need to mark this in the Lucee core, that this is used in that extension and it should not be changed".