Skip to content

Commit

Permalink
[TOMEE-4402] Remove JCache (JSR 107) API and its implementation
Browse files Browse the repository at this point in the history
They were never part of the Jakarta EE specification and JCS is still using the javax.* namespace for CDI e.g.
  • Loading branch information
jungm committed Sep 16, 2024
1 parent 615cc37 commit 73781f3
Show file tree
Hide file tree
Showing 12 changed files with 1 addition and 148 deletions.
11 changes: 0 additions & 11 deletions boms/tomee-plume-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jcache_1.0_spec</artifactId>
<version>1.0-alpha-1</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-mail_2.1_spec</artifactId>
Expand Down
33 changes: 0 additions & 33 deletions boms/tomee-plume/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -661,28 +661,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jcs-core</artifactId>
<version>2.2.1</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jcs-jcache</artifactId>
<version>2.2.1</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
Expand Down Expand Up @@ -958,17 +936,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jcache_1.0_spec</artifactId>
<version>1.0-alpha-1</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-mail_2.1_spec</artifactId>
Expand Down
11 changes: 0 additions & 11 deletions boms/tomee-plus-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jcache_1.0_spec</artifactId>
<version>1.0-alpha-1</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-mail_2.1_spec</artifactId>
Expand Down
33 changes: 0 additions & 33 deletions boms/tomee-plus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -661,28 +661,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jcs-core</artifactId>
<version>2.2.1</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jcs-jcache</artifactId>
<version>2.2.1</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
Expand Down Expand Up @@ -958,17 +936,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jcache_1.0_spec</artifactId>
<version>1.0-alpha-1</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-mail_2.1_spec</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,23 +197,6 @@ private boolean isFiltered(final Collection<Extension> extensions, final Extensi
break;
case "org.apache.batchee.container.cdi.BatchCDIInjectionExtension": // see org.apache.openejb.batchee.BatchEEServiceManager
return "true".equals(systemInstance.getProperty("tomee.batchee.cdi.use-extension", "false"));
case "org.apache.commons.jcs.jcache.cdi.MakeJCacheCDIInterceptorFriendly":
final String spi = "META-INF/services/javax.cache.spi.CachingProvider";
try {
final Enumeration<URL> appResources = Thread.currentThread().getContextClassLoader().getResources(spi);
if (appResources != null && appResources.hasMoreElements()) {
final Collection<URL> containerResources = Collections.list(containerLoader.getResources(spi));
do {
if (!containerResources.contains(appResources.nextElement())) {
log.info("Skipping JCS CDI integration cause another provide was found in the application");
return true;
}
} while (appResources.hasMoreElements());
}
} catch (final Exception e) {
// no-op
}
break;
default:
}
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,6 @@ private void ensureContainerUrls() {
if ((skipContainerFolders && file.isDirectory())
// few hardcoded exclusions, TODO: see if we should filter them in previous call of applyBuiltinExcludes()
|| name.endsWith("tomcat-websocket.jar")
|| name.startsWith("commons-jcs-")
|| name.startsWith("xx-arquillian-tomee")
|| ("lib".equals(name) && file.isDirectory() &&
new File(JavaSecurityManagers.getSystemProperty("openejb.base", "-")).equals(file.getParentFile()))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ private static List<URL> urls(final ClassLoader classLoader) {
urlSet = applyBuiltinExcludes(
urlSet,
Filters.tokens("taglibs-shade", "taglibs-standard-impl", "taglibs-standard-jstlel", "jakarta.faces-2.", "jakarta.faces-2", "spring-security-taglibs", "spring-webmvc"),
Filters.prefixes("commons-jcs-", "myfaces-", "tomcat-websocket.jar")); // myfaces is hardcoded in tomee
Filters.prefixes("myfaces-", "tomcat-websocket.jar")); // myfaces is hardcoded in tomee
} catch (final IOException e) {
DeploymentLoader.LOGGER.warning("Error scanning class loader for JSP tag libraries", e);
}
Expand Down
2 changes: 0 additions & 2 deletions container/openejb-core/src/main/resources/default.exclusions
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ commons-digester-
commons-discovery-
commons-httpclient-
commons-io-
commons-jcs-core-
commons-jcs-jcache-
commons-lang-
commons-lang3-
commons-logging-
Expand Down
2 changes: 0 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@
<version.commons-dbcp2>2.12.0</version.commons-dbcp2>
<version.commons-discovery>0.5</version.commons-discovery>
<version.commons-io>2.16.1</version.commons-io>
<version.commons-jcs-cache>2.2.1</version.commons-jcs-cache>
<version.commons-lang3>3.16.0</version.commons-lang3>
<version.commons-net>3.11.1</version.commons-net>
<version.commons-pool>2.12.0</version.commons-pool>
Expand Down Expand Up @@ -231,7 +230,6 @@
<!-- Other API and Impl. not in Jakarta EE -->
<version.wss4j>3.0.3</version.wss4j>
<version.xmlsec>3.0.4</version.xmlsec>
<version.geronimo-jcache_1.0_spec>1.0-alpha-1</version.geronimo-jcache_1.0_spec>
<version.krazo>2.0.2</version.krazo>
<version.jose4j>0.9.6</version.jose4j>
<version.sxc>0.9</version.sxc>
Expand Down
13 changes: 0 additions & 13 deletions tck/cdi-tomee/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,19 +186,6 @@
</exclusions>
</dependency>

<!-- debugging: said otherwise you can remove them, kept to ease future debugging if needed -->
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jcache_1.0_spec</artifactId>
<version>${version.geronimo-jcache_1.0_spec}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jcs-jcache</artifactId>
<version>${version.commons-jcs-cache}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>tomee-catalina</artifactId>
Expand Down
12 changes: 0 additions & 12 deletions tomee/tomee-plume-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -351,18 +351,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jcache_1.0_spec</artifactId>
<version>${version.geronimo-jcache_1.0_spec}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jcs-jcache</artifactId>
<version>${version.commons-jcs-cache}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.components</groupId>
<artifactId>geronimo-connector</artifactId>
Expand Down
12 changes: 0 additions & 12 deletions tomee/tomee-plus-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -351,18 +351,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jcache_1.0_spec</artifactId>
<version>${version.geronimo-jcache_1.0_spec}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jcs-jcache</artifactId>
<version>${version.commons-jcs-cache}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.components</groupId>
<artifactId>geronimo-connector</artifactId>
Expand Down

0 comments on commit 73781f3

Please sign in to comment.