From fd81ea43d88b309195faaf087ab2b4a1659036c4 Mon Sep 17 00:00:00 2001 From: "HDS\\rammansoor" Date: Sun, 11 Feb 2024 11:31:18 -0500 Subject: [PATCH 1/2] [BACKLOG-39451] - Adding ehcache-core back --- extensions/pom.xml | 36 +++++++++++++++++++ .../plugin/services/cache/CacheManager.java | 11 ++++-- pom.xml | 1 + 3 files changed, 45 insertions(+), 3 deletions(-) diff --git a/extensions/pom.xml b/extensions/pom.xml index 295bab0de62..a6ec3259ac2 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -1005,12 +1005,24 @@ classic-core ${pentaho-reporting.version} compile + + + * + * + + org.pentaho.reporting.engine classic-extensions ${pentaho-reporting.version} compile + + + * + * + + org.pentaho.reporting.engine @@ -1024,17 +1036,41 @@ + + net.sf.ehcache + ehcache-core + ${ehcache-core.version} + compile + + + * + * + + + org.pentaho.reporting.engine classic-extensions-mondrian ${pentaho-reporting.version} compile + + + * + * + + org.pentaho.reporting.engine classic-extensions-olap4j ${pentaho-reporting.version} compile + + + * + * + + org.pentaho.reporting.engine diff --git a/extensions/src/main/java/org/pentaho/platform/plugin/services/cache/CacheManager.java b/extensions/src/main/java/org/pentaho/platform/plugin/services/cache/CacheManager.java index 7807b695889..60e604c3d35 100644 --- a/extensions/src/main/java/org/pentaho/platform/plugin/services/cache/CacheManager.java +++ b/extensions/src/main/java/org/pentaho/platform/plugin/services/cache/CacheManager.java @@ -513,13 +513,18 @@ public long getElementCountInRegionCache( String region ) { Ehcache ehcache = hvcache.getStorageAccess().getCache(); if ( hvcache != null ) { try { - CacheStatistics cacheStatistics = new CacheStatistics( ehcache ); - return cacheStatistics.getMemoryStoreObjectCount() + cacheStatistics.getDiskStoreObjectCount(); + long memCnt = ehcache.getStatistics().getMemoryStoreObjectCount(); + long discCnt = ehcache.getStatistics().getDiskStoreObjectCount(); + return memCnt + discCnt; } catch ( Exception ignored ) { + return -1; } + } else { + return -1; } + } else { + return -1; } - return -1; } @Override diff --git a/pom.xml b/pom.xml index 0429e9f3bb3..77539ad13fd 100644 --- a/pom.xml +++ b/pom.xml @@ -20,6 +20,7 @@ https://github.com/pentaho/pentaho-platform + 2.5.1 3.2.0 1.3.9 1.0 From df54a29fe88e837997731f683427b414f79af21e Mon Sep 17 00:00:00 2001 From: Tim Kafalas tkafalas Date: Mon, 12 Feb 2024 17:08:23 -0500 Subject: [PATCH 2/2] [BACKLOG-39451] - Adding ehcache-core back --- assemblies/pentaho-war/pom.xml | 6 ++++++ repository/pom.xml | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/assemblies/pentaho-war/pom.xml b/assemblies/pentaho-war/pom.xml index fda88cbb6af..50a94546bcc 100644 --- a/assemblies/pentaho-war/pom.xml +++ b/assemblies/pentaho-war/pom.xml @@ -840,6 +840,12 @@ org.hibernate hibernate-ehcache ${hibernate-ehcache.version} + + + * + * + + org.yaml diff --git a/repository/pom.xml b/repository/pom.xml index a3f36cb2954..7364a57187c 100644 --- a/repository/pom.xml +++ b/repository/pom.xml @@ -783,12 +783,6 @@ org.osgi.core test - - org.hibernate - hibernate-ehcache - ${hibernate-ehcache.version} - test - pentaho pentaho-platform-core