This is an automated email from the ASF dual-hosted git repository. jeetkundoug pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit d40e4ecc09f2880102d2226e31fd771a3bbdd66e Merge: 035a220d55 b4dcef7841 Author: Doug Rohrer <[email protected]> AuthorDate: Fri Oct 24 14:27:39 2025 -0400 Merge branch 'cassandra-5.0' into trunk .build/parent-maven-pom.xml | 2 +- CHANGES.txt | 1 + ide/nbproject/project.xml | 2 +- .../utils/RMIClientSocketFactoryImpl.java | 83 ------------ .../utils/RMICloseableClientSocketFactory.java | 29 ---- .../utils/RMICloseableServerSocketFactory.java | 29 ---- .../distributed/impl/AbstractCluster.java | 8 +- .../impl/CollectingRMIServerSocketFactoryImpl.java | 89 ------------ .../CollectingSslRMIServerSocketFactoryImpl.java | 150 --------------------- .../cassandra/distributed/impl/IsolatedJmx.java | 5 +- .../distributed/impl/IsolatedJmxSocketFactory.java | 5 +- .../impl/RMISslClientSocketFactoryImpl.java | 131 ------------------ 12 files changed, 11 insertions(+), 523 deletions(-) diff --cc .build/parent-maven-pom.xml index e61e4208d6,0000000000..dfad866104 mode 100644,000000..100644 --- a/.build/parent-maven-pom.xml +++ b/.build/parent-maven-pom.xml @@@ -1,1306 -1,0 +1,1306 @@@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>apache</artifactId> + <groupId>org.apache</groupId> + <version>22</version> + </parent> + <groupId>org.apache.cassandra</groupId> + <artifactId>cassandra-parent</artifactId> + <version>@version@</version> + <packaging>pom</packaging> + <name>Apache Cassandra</name> + <description>The Apache Cassandra Project develops a highly scalable second-generation distributed database, bringing together Dynamo's fully distributed design and Bigtable's ColumnFamily-based data model.</description> + <url>https://cassandra.apache.org</url> + <inceptionYear>2009</inceptionYear> + <licenses> + <license> + <name>The Apache Software License, Version 2.0</name> + <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url> + </license> + </licenses> + <properties> + <bytebuddy.version>1.12.13</bytebuddy.version> + <byteman.version>4.0.20</byteman.version> + <netty.version>4.1.125.Final</netty.version> + <ohc.version>0.5.1</ohc.version> + + <!-- These are referenced in build.xml, so need to be propagated from there --> + <asm.version>@asm.version@</asm.version> + <jamm.version>@jamm.version@</jamm.version> + <allocation-instrumenter.version>@allocation-instrumenter.version@</allocation-instrumenter.version> + <ecj.version>@ecj.version@</ecj.version> + <jacoco.version>@jacoco.version@</jacoco.version> + <jflex.version>@jflex.version@</jflex.version> + </properties> + <developers> + <developer> + <id>adelapena</id> + <name>Andres de la Peña</name> + </developer> + <developer> + <id>alakshman</id> + <name>Avinash Lakshman</name> + </developer> + <developer> + <id>aleksey</id> + <name>Aleksey Yeschenko</name> + </developer> + <developer> + <id>amorton</id> + <name>Aaron Morton</name> + </developer> + <developer> + <id>aweisberg</id> + <name>Ariel Weisberg</name> + </developer> + <developer> + <id>bdeggleston</id> + <name>Blake Eggleston</name> + </developer> + <developer> + <id>benedict</id> + <name>Benedict Elliott Smith</name> + </developer> + <developer> + <id>benjamin</id> + <name>Benjamin Lerer</name> + </developer> + <developer> + <id>blambov</id> + <name>Branimir Lambov</name> + </developer> + <developer> + <id>brandonwilliams</id> + <name>Brandon Williams</name> + </developer> + <developer> + <id>carl</id> + <name>Carl Yeksigian</name> + </developer> + <developer> + <id>dbrosius</id> + <name>David Brosiusd</name> + </developer> + <developer> + <id>dikang</id> + <name>Dikang Gu</name> + </developer> + <developer> + <id>eevans</id> + <name>Eric Evans</name> + </developer> + <developer> + <id>edimitrova</id> + <name>Ekaterina Dimitrova</name> + </developer> + <developer> + <id>gdusbabek</id> + <name>Gary Dusbabek</name> + </developer> + <developer> + <id>goffinet</id> + <name>Chris Goffinet</name> + </developer> + <developer> + <id>ifesdjeen</id> + <name>Alex Petrov</name> + </developer> + <developer> + <id>jaakko</id> + <name>Laine Jaakko Olavi</name> + </developer> + <developer> + <id>jake</id> + <name>T Jake Luciani</name> + </developer> + <developer> + <id>jasonbrown</id> + <name>Jason Brown</name> + </developer> + <developer> + <id>jbellis</id> + <name>Jonathan Ellis</name> + </developer> + <developer> + <id>jfarrell</id> + <name>Jake Farrell</name> + </developer> + <developer> + <id>jjirsa</id> + <name>Jeff Jirsa</name> + </developer> + <developer> + <id>jkni</id> + <name>Joel Knighton</name> + </developer> + <developer> + <id>jmckenzie</id> + <name>Josh McKenzie</name> + </developer> + <developer> + <id>johan</id> + <name>Johan Oskarsson</name> + </developer> + <developer> + <id>junrao</id> + <name>Jun Rao</name> + </developer> + <developer> + <id>jzhuang</id> + <name>Jay Zhuang</name> + </developer> + <developer> + <id>kohlisankalp</id> + <name>Sankalp Kohli</name> + </developer> + <developer> + <id>marcuse</id> + <name>Marcus Eriksson</name> + </developer> + <developer> + <id>mck</id> + <name>Michael Semb Wever</name> + </developer> + <developer> + <id>mishail</id> + <name>Mikhail Stepura</name> + </developer> + <developer> + <id>mshuler</id> + <name>Michael Shuler</name> + </developer> + <developer> + <id>paulo</id> + <name>Paulo Motta</name> + </developer> + <developer> + <id>pmalik</id> + <name>Prashant Malik</name> + </developer> + <developer> + <id>rstupp</id> + <name>Robert Stupp</name> + </developer> + <developer> + <id>scode</id> + <name>Peter Schuller</name> + </developer> + <developer> + <id>beobal</id> + <name>Sam Tunnicliffe</name> + </developer> + <developer> + <id>slebresne</id> + <name>Sylvain Lebresne</name> + </developer> + <developer> + <id>stefania</id> + <name>Stefania Alborghetti</name> + </developer> + <developer> + <id>tylerhobbs</id> + <name>Tyler Hobbs</name> + </developer> + <developer> + <id>vijay</id> + <name>Vijay Parthasarathy</name> + </developer> + <developer> + <id>xedin</id> + <name>Pavel Yaskevich</name> + </developer> + <developer> + <id>yukim</id> + <name>Yuki Morishita</name> + </developer> + <developer> + <id>zznate</id> + <name>Nate McCall</name> + </developer> + <developer> + <id>smiklosovic</id> + <name>Stefan Miklosovic</name> + </developer> + </developers> + <scm> + <connection>scm:https://gitbox.apache.org/repos/asf/cassandra.git</connection> + <developerConnection>scm:https://gitbox.apache.org/repos/asf/cassandra.git</developerConnection> + <url>https://gitbox.apache.org/repos/asf?p=cassandra.git</url> + </scm> + + <profiles> + <profile> + <id>x86_64</id> + <activation> + <os> + <!-- we need something as a default even if it doesn't successfully load the .so files. --> + <arch>!aarch64</arch> + </os> + </activation> + <dependencies> + <dependency> + <groupId>software.amazon.cryptools</groupId> + <artifactId>AmazonCorrettoCryptoProvider</artifactId> + <classifier>linux-x86_64</classifier> + <version>2.2.0</version> + <scope>provided</scope> + </dependency> + </dependencies> + </profile> + <profile> + <id>aarch_64</id> + <activation> + <os> + <arch>aarch64</arch> + </os> + </activation> + <dependencies> + <dependency> + <groupId>software.amazon.cryptools</groupId> + <artifactId>AmazonCorrettoCryptoProvider</artifactId> + <classifier>linux-aarch_64</classifier> + <version>2.2.0</version> + <scope>provided</scope> + </dependency> + </dependencies> + </profile> + </profiles> + + <dependencyManagement> + <!-- + Dependency metadata is specified here (version, scope, exclusions, etc.), then referenced in child POMs by groupId and + artifactId. + --> + <dependencies> + <dependency> + <groupId>org.xerial.snappy</groupId> + <artifactId>snappy-java</artifactId> + <version>1.1.10.4</version> + </dependency> + <dependency> + <groupId>org.lz4</groupId> + <artifactId>lz4-java</artifactId> + <version>1.8.0</version> + </dependency> + <dependency> + <groupId>com.github.luben</groupId> + <artifactId>zstd-jni</artifactId> + <version>1.5.7-2</version> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>32.0.1-jre</version> + <exclusions> + <exclusion> + <artifactId>jsr305</artifactId> + <groupId>com.google.code.findbugs</groupId> + </exclusion> + <exclusion> + <artifactId>animal-sniffer-annotations</artifactId> + <groupId>org.codehaus.mojo</groupId> + </exclusion> + <exclusion> + <artifactId>listenablefuture</artifactId> + <groupId>com.google.guava</groupId> + </exclusion> + <exclusion> + <artifactId>checker-qual</artifactId> + <groupId>org.checkerframework</groupId> + </exclusion> + <exclusion> + <artifactId>error_prone_annotations</artifactId> + <groupId>com.google.errorprone</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava-testlib</artifactId> + <version>27.0-jre</version> + </dependency> + <dependency> + <groupId>com.google.jimfs</groupId> + <artifactId>jimfs</artifactId> + <version>1.1</version> + <exclusions> + <exclusion> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.hdrhistogram</groupId> + <artifactId>HdrHistogram</artifactId> + <version>2.1.12</version> + </dependency> + <dependency> + <groupId>commons-cli</groupId> + <artifactId>commons-cli</artifactId> + <version>1.5.0</version> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>2.11.0</version> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + <version>3.18.0</version> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-math3</artifactId> + <version>3.2</version> + </dependency> + <dependency> + <groupId>org.antlr</groupId> + <artifactId>antlr</artifactId> + <version>3.5.2</version> + <scope>provided</scope> + <exclusions> + <exclusion> + <artifactId>stringtemplate</artifactId> + <groupId>org.antlr</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.antlr</groupId> + <artifactId>ST4</artifactId> + <version>4.0.8</version> + </dependency> + <dependency> + <groupId>org.antlr</groupId> + <artifactId>antlr-runtime</artifactId> + <version>3.5.2</version> + <exclusions> + <exclusion> + <artifactId>stringtemplate</artifactId> + <groupId>org.antlr</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>2.0.17</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>log4j-over-slf4j</artifactId> + <version>2.0.17</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + <version>2.0.17</version> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + <version>1.5.18</version> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>1.5.18</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + <version>2.19.2</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>2.19.2</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-annotations</artifactId> + <version>2.19.2</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.datatype</groupId> + <artifactId>jackson-datatype-jsr310</artifactId> + <version>2.19.2</version> + </dependency> + <dependency> + <!-- Keep an eye on this when bumping it as it depends on snakeyaml we use in production as well + and historically we have been excluding snakeyaml from here. We are using snakeyaml 2.4 now, Jackson 2.19.2 + is using snakeyaml of that version too, so it is not necessary to exclude it. OWASP checks 12.1.6 also + depends on snakeyaml 2.4. --> + <groupId>com.fasterxml.jackson.dataformat</groupId> + <artifactId>jackson-dataformat-yaml</artifactId> + <version>2.19.2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.boundary</groupId> + <artifactId>high-scale-lib</artifactId> + <version>1.0.6</version> + </dependency> + <dependency> + <groupId>com.github.jbellis</groupId> + <artifactId>jamm</artifactId> + <version>${jamm.version}</version> + </dependency> + <dependency> + <!-- Test scoped jackson-dataformat-yaml also depends on snakeyaml. For now, these versions are aligned + but if you happen to bump it here then exclude it in jackson-dataformat-yaml. + --> + <groupId>org.yaml</groupId> + <artifactId>snakeyaml</artifactId> + <version>2.4</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>hamcrest-core</artifactId> + <groupId>org.hamcrest</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>4.7.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-inline</artifactId> + <version>4.7.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.quicktheories</groupId> + <artifactId>quicktheories</artifactId> + <version>0.26</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.java-allocation-instrumenter</groupId> + <artifactId>java-allocation-instrumenter</artifactId> + <version>${allocation-instrumenter.version}</version> + <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>guava</artifactId> + <groupId>com.google.guava</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.reflections</groupId> + <artifactId>reflections</artifactId> + <version>0.10.2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.cassandra</groupId> + <artifactId>dtest-api</artifactId> - <version>0.0.17</version> ++ <version>0.0.18</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.github.tomakehurst</groupId> + <artifactId>wiremock-jre8</artifactId> + <version>2.35.0</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-annotations</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>com.puppycrawl.tools</groupId> + <artifactId>checkstyle</artifactId> + <version>10.12.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna</artifactId> + <version>5.13.0</version> + </dependency> + + <dependency> + <!-- transitive to posix to chronicle-core, declared explicit to use newer version --> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna-platform</artifactId> + <version>5.13.0</version> + </dependency> + <dependency> + <!-- transitive to posix to chronicle-core, declared explicit to use newer version --> + <groupId>com.github.jnr</groupId> + <artifactId>jnr-ffi</artifactId> + <version>2.2.13</version> + <exclusions> + <exclusion> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-analysis</artifactId> + </exclusion> + <exclusion> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-commons</artifactId> + </exclusion> + <exclusion> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-tree</artifactId> + </exclusion> + <exclusion> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-util</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <!-- transitive to jnr-ffi to posix to chronicle-core, declared explicit to use newer version --> + <groupId>com.github.jnr</groupId> + <artifactId>jffi</artifactId> + <version>1.3.11</version> + </dependency> + <dependency> + <!-- transitive to jnr-ffi to posix to chronicle-core, declared explicit to use newer version --> + <groupId>com.github.jnr</groupId> + <artifactId>jffi</artifactId> + <classifier>native</classifier> + <version>1.3.11</version> + </dependency> + <dependency> + <!-- transitive to posix to chronicle-core, declared explicit to use newer version --> + <groupId>com.github.jnr</groupId> + <artifactId>jnr-constants</artifactId> + <version>0.10.4</version> + </dependency> + + <dependency> + <groupId>org.jacoco</groupId> + <artifactId>org.jacoco.agent</artifactId> + <version>${jacoco.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.jacoco</groupId> + <artifactId>org.jacoco.ant</artifactId> + <version>${jacoco.version}</version> + <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>asm</artifactId> + <groupId>org.ow2.asm</groupId> + </exclusion> + </exclusions> + </dependency> + <!-- these dependencies have to be of provided scope as they are used by cassandra-dtests and ccm is looking + for these libraries in build/lib/jars --> + <dependency> + <groupId>org.jboss.byteman</groupId> + <artifactId>byteman-install</artifactId> + <version>${byteman.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.jboss.byteman</groupId> + <artifactId>byteman</artifactId> + <version>${byteman.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.jboss.byteman</groupId> + <artifactId>byteman-submit</artifactId> + <version>${byteman.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.jboss.byteman</groupId> + <artifactId>byteman-bmunit</artifactId> + <version>${byteman.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy</artifactId> + <version>${bytebuddy.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy-agent</artifactId> + <version>${bytebuddy.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.openjdk.jmh</groupId> + <artifactId>jmh-core</artifactId> + <version>1.37</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.openjdk.jmh</groupId> + <artifactId>jmh-generator-annprocess</artifactId> + <version>1.37</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>io.github.java-diff-utils</groupId> + <artifactId>java-diff-utils</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.ant</groupId> + <artifactId>ant-junit</artifactId> + <version>1.10.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.cassandra</groupId> + <artifactId>cassandra-all</artifactId> + <version>@version@</version> + </dependency> + <dependency> + <groupId>io.dropwizard.metrics</groupId> + <artifactId>metrics-core</artifactId> + <version>4.2.28</version> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>io.dropwizard.metrics</groupId> + <artifactId>metrics-jvm</artifactId> + <version>4.2.19</version> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>io.dropwizard.metrics</groupId> + <artifactId>metrics-logback</artifactId> + <version>4.2.19</version> + <exclusions> + <exclusion> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + </exclusion> + <exclusion> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.mindrot</groupId> + <artifactId>jbcrypt</artifactId> + <version>0.4</version> + </dependency> + <dependency> + <groupId>org.apache.cassandra</groupId> + <artifactId>cassandra-accord</artifactId> + <version>@version@</version> + <exclusions> + <exclusion> + <artifactId>org.apache.cassandra</artifactId> + <groupId>cassandra-all</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.cassandra</groupId> + <artifactId>cassandra-accord</artifactId> + <version>@version@</version> + <classifier>tests</classifier> + <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>org.junit.jupiter</artifactId> + <groupId>junit-jupiter-api</groupId> + </exclusion> + <exclusion> + <artifactId>org.junit.jupiter</artifactId> + <groupId>junit-jupiter-engine</groupId> + </exclusion> + <exclusion> + <artifactId>ch.qos.logback</artifactId> + <groupId>logback-classic</groupId> + </exclusion> + <exclusion> + <artifactId>org.apache.cassandra</artifactId> + <groupId>cassandra-all</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>info.picocli</groupId> + <artifactId>picocli</artifactId> + <version>4.7.7</version> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-all</artifactId> + <version>${netty.version}</version> + <exclusions> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-dns</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-haproxy</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-http2</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-http</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-memcache</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-mqtt</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-redis</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-smtp</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-socks</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-stomp</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-xml</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-transport-udt</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-transport-sctp</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-transport-rxtx</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-resolver-dns</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-resolver-dns-classes-macos</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-tcnative-boringssl-static</artifactId> + <version>2.0.70.Final</version> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpkix-jdk18on</artifactId> + <version>1.78</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk18on</artifactId> + <version>1.78</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcutil-jdk18on</artifactId> + <version>1.78</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-transport-native-epoll</artifactId> + <version>${netty.version}</version> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-transport-native-epoll</artifactId> + <version>${netty.version}</version> + <classifier>linux-x86_64</classifier> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-transport-native-epoll</artifactId> + <version>${netty.version}</version> + <classifier>linux-aarch_64</classifier> + </dependency> + + <!-- chronicle-queue deps --> + <dependency> + <groupId>net.openhft</groupId> + <artifactId>chronicle-queue</artifactId> + <version>5.23.37</version> + <exclusions> + <exclusion> + <artifactId>tools</artifactId> + <groupId>com.sun</groupId> + </exclusion> + <exclusion> + <!-- pulls in affinity-3.23ea1 which pulls in third-party-bom-3.22.4-SNAPSHOT --> + <groupId>net.openhft</groupId> + <artifactId>affinity</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>net.openhft</groupId> + <artifactId>chronicle-core</artifactId> + <version>2.23.36</version> + <exclusions> + <exclusion> + <artifactId>chronicle-analytics</artifactId> + <groupId>net.openhft</groupId> + </exclusion> + <exclusion> + <artifactId>annotations</artifactId> + <groupId>org.jetbrains</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>net.openhft</groupId> + <artifactId>chronicle-bytes</artifactId> + <version>2.23.33</version> + <exclusions> + <exclusion> + <artifactId>annotations</artifactId> + <groupId>org.jetbrains</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>net.openhft</groupId> + <artifactId>chronicle-wire</artifactId> + <version>2.23.39</version> + <exclusions> + <exclusion> + <artifactId>compiler</artifactId> + <groupId>net.openhft</groupId> + </exclusion> + <exclusion> + <!-- pulls in affinity-3.23ea1 which pulls in third-party-bom-3.22.4-SNAPSHOT --> + <groupId>net.openhft</groupId> + <artifactId>affinity</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>net.openhft</groupId> + <artifactId>chronicle-threads</artifactId> + <version>2.23.25</version> + <exclusions> + <exclusion> + <!-- pulls in affinity-3.23ea1 which pulls in third-party-bom-3.22.4-SNAPSHOT --> + <groupId>net.openhft</groupId> + <artifactId>affinity</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <!-- transitive to chronicle-queue, declared explicit to use newer version --> + <groupId>net.openhft</groupId> + <artifactId>affinity</artifactId> + <version>3.23.3</version> + </dependency> + <dependency> + <!-- transitive to chronicle-queue, declared explicit to use newer version --> + <groupId>net.openhft</groupId> + <artifactId>posix</artifactId> + <version>2.24ea4</version> + </dependency> + <!-- end of chronicle-queue --> + + <dependency> + <groupId>com.google.code.findbugs</groupId> + <artifactId>jsr305</artifactId> + <version>2.0.2</version> + </dependency> + <dependency> + <groupId>com.clearspring.analytics</groupId> + <artifactId>stream</artifactId> + <version>2.5.2</version> + <exclusions> + <exclusion> + <artifactId>fastutil</artifactId> + <groupId>it.unimi.dsi</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.cassandra</groupId> + <artifactId>cassandra-driver-core</artifactId> + <version>3.12.1</version> + <classifier>shaded</classifier> + <exclusions> + <exclusion> + <artifactId>netty-buffer</artifactId> + <groupId>io.netty</groupId> + </exclusion> + <exclusion> + <artifactId>netty-codec</artifactId> + <groupId>io.netty</groupId> + </exclusion> + <exclusion> + <artifactId>netty-handler</artifactId> + <groupId>io.netty</groupId> + </exclusion> + <exclusion> + <artifactId>netty-transport</artifactId> + <groupId>io.netty</groupId> + </exclusion> + <exclusion> + <artifactId>slf4j-api</artifactId> + <groupId>org.slf4j</groupId> + </exclusion> + <exclusion> + <artifactId>jnr-ffi</artifactId> + <groupId>com.github.jnr</groupId> + </exclusion> + <exclusion> + <artifactId>jnr-posix</artifactId> + <groupId>com.github.jnr</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.eclipse.jdt</groupId> + <artifactId>ecj</artifactId> + <version>${ecj.version}</version> + </dependency> + <dependency> + <groupId>org.caffinitas.ohc</groupId> + <artifactId>ohc-core</artifactId> + <version>${ohc.version}</version> + <exclusions> + <exclusion> + <artifactId>slf4j-api</artifactId> + <groupId>org.slf4j</groupId> + </exclusion> + <exclusion> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.caffinitas.ohc</groupId> + <artifactId>ohc-core-j8</artifactId> + <version>${ohc.version}</version> + </dependency> + <dependency> + <groupId>net.ju-n.compile-command-annotations</groupId> + <artifactId>compile-command-annotations</artifactId> + <version>1.2.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.github.oshi</groupId> + <artifactId>oshi-core</artifactId> + <version>6.4.8</version> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-bom</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-parent</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>com.carrotsearch</groupId> + <artifactId>hppc</artifactId> + <version>0.8.1</version> + </dependency> + <dependency> + <groupId>de.jflex</groupId> + <artifactId>jflex</artifactId> + <version>${jflex.version}</version> + <exclusions> + <exclusion> + <artifactId>ant</artifactId> + <groupId>org.apache.ant</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>com.googlecode.concurrent-trees</groupId> + <artifactId>concurrent-trees</artifactId> + <version>2.4.0</version> + </dependency> + <dependency> + <groupId>com.github.ben-manes.caffeine</groupId> + <artifactId>caffeine</artifactId> + <version>3.1.8</version> + <exclusions> + <exclusion> + <groupId>org.checkerframework</groupId> + <artifactId>checker-qual</artifactId> + </exclusion> + <exclusion> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_annotations</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.jctools</groupId> + <artifactId>jctools-core</artifactId> + <version>3.1.0</version> + </dependency> + + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm</artifactId> + <version>${asm.version}</version> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-analysis</artifactId> + <version>${asm.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-tree</artifactId> + <version>${asm.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-commons</artifactId> + <version>${asm.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-util</artifactId> + <version>${asm.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.gridkit.jvmtool</groupId> + <artifactId>sjk-cli</artifactId> + <version>0.14</version> + </dependency> + <dependency> + <groupId>org.gridkit.jvmtool</groupId> + <artifactId>sjk-core</artifactId> + <version>0.14</version> + <exclusions> + <exclusion> + <artifactId>sjk-hflame</artifactId> + <groupId>org.gridkit.jvmtool</groupId> + </exclusion> + <exclusion> + <artifactId>sjk-hflame</artifactId> + <groupId>org.perfkit.sjk.parsers</groupId> + </exclusion> + <exclusion> + <artifactId>sjk-jfr-standalone</artifactId> + <groupId>org.perfkit.sjk.parsers</groupId> + </exclusion> + <exclusion> + <artifactId>sjk-nps</artifactId> + <groupId>org.perfkit.sjk.parsers</groupId> + </exclusion> + <exclusion> + <artifactId>sjk-jfr5</artifactId> + <groupId>org.perfkit.sjk.parsers</groupId> + </exclusion> + <exclusion> + <artifactId>sjk-jfr6</artifactId> + <groupId>org.perfkit.sjk.parsers</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.gridkit.jvmtool</groupId> + <artifactId>sjk-stacktrace</artifactId> + <version>0.14</version> + </dependency> + <dependency> + <groupId>org.gridkit.jvmtool</groupId> + <artifactId>mxdump</artifactId> + <version>0.14</version> + </dependency> + <dependency> + <groupId>org.gridkit.lab</groupId> + <artifactId>jvm-attach-api</artifactId> + <version>1.5</version> + </dependency> + <dependency> + <groupId>org.gridkit.jvmtool</groupId> + <artifactId>sjk-json</artifactId> + <version>0.14</version> + </dependency> + <dependency> + <groupId>com.beust</groupId> + <artifactId>jcommander</artifactId> + <version>1.30</version> + </dependency> + <dependency> + <groupId>org.psjava</groupId> + <artifactId>psjava</artifactId> + <version>0.1.19</version> + </dependency> + <dependency> + <groupId>javax.inject</groupId> + <artifactId>javax.inject</artifactId> + <version>1</version> + </dependency> + <dependency> + <groupId>com.google.j2objc</groupId> + <artifactId>j2objc-annotations</artifactId> + <version>1.3</version> + </dependency> + <!-- adding this dependency is necessary for assertj. When updating assertj, need to also update the version of + this that the new assertj's `assertj-parent-pom` depends on. --> + <dependency> + <groupId>org.junit</groupId> + <artifactId>junit-bom</artifactId> + <version>5.9.1</version> + <type>pom</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>3.24.2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.awaitility</groupId> + <artifactId>awaitility</artifactId> + <version>4.0.3</version> + <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>hamcrest</artifactId> + <groupId>org.hamcrest</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest</artifactId> + <version>2.2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.github.seancfoley</groupId> + <artifactId>ipaddress</artifactId> + <version>5.3.3</version> + </dependency> + <dependency> + <groupId>org.agrona</groupId> + <artifactId>agrona</artifactId> + <version>1.17.1</version> + </dependency> + <dependency> + <groupId>org.apache.lucene</groupId> + <artifactId>lucene-core</artifactId> + <version>9.12.0</version> + </dependency> + <dependency> + <groupId>org.apache.lucene</groupId> + <artifactId>lucene-analysis-common</artifactId> + <version>9.12.0</version> + </dependency> + <dependency> + <groupId>io.github.jbellis</groupId> + <artifactId>jvector</artifactId> + <version>1.0.2</version> + </dependency> + <dependency> + <groupId>com.carrotsearch.randomizedtesting</groupId> + <artifactId>randomizedtesting-runner</artifactId> + <version>2.1.2</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>ch.obermuhlner</groupId> + <artifactId>big-math</artifactId> + <version>2.3.0</version> + </dependency> + <dependency> + <groupId>com.vdurmont</groupId> + <artifactId>semver4j</artifactId> + <version>3.1.0</version> + </dependency> + <dependency> + <groupId>org.passay</groupId> + <artifactId>passay</artifactId> + <version>1.6.4</version> + </dependency> + </dependencies> + </dependencyManagement> +</project> diff --cc CHANGES.txt index 0f5b3fa878,924613cdf7..1c0989def3 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -319,18 -92,7 +319,19 @@@ Merged from 4.1 * Optionally skip exception logging on invalid legacy protocol magic exception (CASSANDRA-19483) * Fix SimpleClient ability to release acquired capacity (CASSANDRA-20202) * Fix WaitQueue.Signal.awaitUninterruptibly may block forever if invoking thread is interrupted (CASSANDRA-20084) + * Run audit_logging_options through santiation and validation on startup (CASSANDRA-20208) + * Enforce CQL message size limit on multiframe messages (CASSANDRA-20052) + * Fix race condition in DecayingEstimatedHistogramReservoir during rescale (CASSANDRA-19365) Merged from 4.0: ++ * Updated dtest-api to 0.0.18 and removed JMX-related classes that now live in the dtest-api (CASSANDRA-20884) + * Fixed incorrect error message constant for keyspace name length validation (CASSANDRA-20915) + * Prevent too long table names not fitting file names (CASSANDRA-20389) + * Update Jackson to 2.19.2 (CASSANDRA-20848) + * Update commons-lang3 to 3.18.0 (CASSANDRA-20849) + * Add NativeTransportMaxConcurrentConnectionsPerIp to StorageProxyMBean (CASSANDRA-20642) + * Make secondary index implementations notified about rows in fully expired SSTables in compaction (CASSANDRA-20829) + * Ensure prepared_statement INSERT timestamp precedes eviction DELETE (CASSANDRA-19703) + * Gossip doesn't converge due to race condition when updating EndpointStates multiple fields (CASSANDRA-20659) * Handle sstable metadata stats file getting a new mtime after compaction has finished (CASSANDRA-18119) * Honor MAX_PARALLEL_TRANSFERS correctly (CASSANDRA-20532) * Updating a column with a new TTL but same expiration time is non-deterministic and causes repair mismatches. (CASSANDRA-20561) diff --cc ide/nbproject/project.xml index cce2bfdadc,d88a189c7c..15f0e229fa --- a/ide/nbproject/project.xml +++ b/ide/nbproject/project.xml @@@ -7,8 -7,7 +7,8 @@@ <properties> <property name="project.dir">..</property> <!-- the compile classpaths should be distinct per compilation unit… but it is kept simple and the build will catch errors --> - <property name="cassandra.classpath.jars">${project.dir}/build/lib/jars/AmazonCorrettoCryptoProvider-2.2.0-linux-aarch_64.jar:${project.dir}/build/lib/jars/HdrHistogram-2.1.12.jar:${project.dir}/build/lib/jars/ST4-4.0.8.jar:${project.dir}/build/lib/jars/affinity-3.23.3.jar:${project.dir}/build/lib/jars/agrona-1.17.1.jar:${project.dir}/build/lib/jars/airline-0.8.jar:${project.dir}/build/lib/jars/antlr-3.5.2.jar:${project.dir}/build/lib/jars/antlr-runtime-3.5.2.jar:${proje [...] + <!-- DO NOT EDIT THE FOLLOWING LINE DIRECTLY: Use the update-netbeans-classpath.sh script --> - <property name="cassandra.classpath.jars">${project.dir}/build/lib/jars/AmazonCorrettoCryptoProvider-2.2.0-linux-aarch_64.jar:${project.dir}/build/lib/jars/HdrHistogram-2.1.12.jar:${project.dir}/build/lib/jars/ST4-4.0.8.jar:${project.dir}/build/lib/jars/affinity-3.23.3.jar:${project.dir}/build/lib/jars/agrona-1.17.1.jar:${project.dir}/build/lib/jars/airline-0.8.jar:${project.dir}/build/lib/jars/antlr-3.5.2.jar:${project.dir}/build/lib/jars/antlr-runtime-3.5.2.jar:${proje [...] ++ <property name="cassandra.classpath.jars">${project.dir}/build/lib/jars/AmazonCorrettoCryptoProvider-2.2.0-linux-aarch_64.jar:${project.dir}/build/lib/jars/HdrHistogram-2.1.12.jar:${project.dir}/build/lib/jars/ST4-4.0.8.jar:${project.dir}/build/lib/jars/affinity-3.23.3.jar:${project.dir}/build/lib/jars/agrona-1.17.1.jar:${project.dir}/build/lib/jars/airline-0.8.jar:${project.dir}/build/lib/jars/antlr-3.5.2.jar:${project.dir}/build/lib/jars/antlr-runtime-3.5.2.jar:${proje [...] </properties> <folders> <source-folder> diff --cc test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java index 805d15665a,b670fc868c..224adabdb1 --- a/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java +++ b/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java @@@ -228,13 -202,7 +228,7 @@@ public abstract class AbstractCluster< withSharedClasses(SHARED_PREDICATE); } - @SuppressWarnings("unchecked") - private B self() - { - return (B) this; - } - - public B withNodeProvisionStrategy(INodeProvisionStrategy.Strategy nodeProvisionStrategy) + public B withNodeProvisionStrategy(INodeProvisionStrategy.Factory nodeProvisionStrategy) { this.nodeProvisionStrategy = nodeProvisionStrategy; return self(); diff --cc test/distributed/org/apache/cassandra/distributed/impl/IsolatedJmx.java index 7ad57a52b6,41a722a3d1..554b7a7317 --- a/test/distributed/org/apache/cassandra/distributed/impl/IsolatedJmx.java +++ b/test/distributed/org/apache/cassandra/distributed/impl/IsolatedJmx.java @@@ -33,12 -32,13 +33,15 @@@ import javax.management.remote.rmi.RMIC import javax.management.remote.rmi.RMIJRMPServerImpl; import com.google.common.util.concurrent.Uninterruptibles; + -import org.apache.cassandra.distributed.shared.jmx.CollectingRMIServerSocketFactoryImpl; -import org.apache.cassandra.distributed.shared.jmx.RMIClientSocketFactoryImpl; import org.slf4j.Logger; +import org.apache.cassandra.config.EncryptionOptions; +import org.apache.cassandra.config.JMXServerOptions; import org.apache.cassandra.distributed.api.IInstance; import org.apache.cassandra.distributed.api.IInstanceConfig; ++import org.apache.cassandra.distributed.shared.jmx.RMICloseableClientSocketFactory; ++import org.apache.cassandra.distributed.shared.jmx.RMICloseableServerSocketFactory; import org.apache.cassandra.distributed.shared.JMXUtil; import org.apache.cassandra.utils.JMXServerUtils; import org.apache.cassandra.utils.MBeanWrapper; diff --cc test/distributed/org/apache/cassandra/distributed/impl/IsolatedJmxSocketFactory.java index 2aa4415af9,0000000000..108ca9f1bc mode 100644,000000..100644 --- a/test/distributed/org/apache/cassandra/distributed/impl/IsolatedJmxSocketFactory.java +++ b/test/distributed/org/apache/cassandra/distributed/impl/IsolatedJmxSocketFactory.java @@@ -1,85 -1,0 +1,88 @@@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.cassandra.distributed.impl; + +import java.net.InetAddress; +import java.util.Arrays; +import java.util.Map; +import java.util.stream.Collectors; +import javax.net.ssl.SSLContext; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + - import org.apache.cassandra.utils.RMIClientSocketFactoryImpl; ++import org.apache.cassandra.distributed.shared.jmx.CollectingRMIServerSocketFactoryImpl; ++import org.apache.cassandra.distributed.shared.jmx.CollectingSslRMIServerSocketFactoryImpl; ++import org.apache.cassandra.distributed.shared.jmx.RMIClientSocketFactoryImpl; ++import org.apache.cassandra.distributed.shared.jmx.RMISslClientSocketFactoryImpl; +import org.apache.cassandra.utils.jmx.AbstractJmxSocketFactory; + +import static javax.management.remote.rmi.RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE; +import static javax.management.remote.rmi.RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE; +import static org.apache.cassandra.config.CassandraRelevantProperties.JAVAX_RMI_SSL_CLIENT_ENABLED_CIPHER_SUITES; +import static org.apache.cassandra.config.CassandraRelevantProperties.JAVAX_RMI_SSL_CLIENT_ENABLED_PROTOCOLS; + +/** + * JMX Socket factory used for the isolated JMX testing. + */ +public class IsolatedJmxSocketFactory extends AbstractJmxSocketFactory +{ + private static final Logger logger = LoggerFactory.getLogger(IsolatedJmxSocketFactory.class); + + @Override + public void configureLocalSocketFactories(Map<String, Object> env, InetAddress serverAddress) + { + CollectingRMIServerSocketFactoryImpl serverSocketFactory = new CollectingRMIServerSocketFactoryImpl(serverAddress); + RMIClientSocketFactoryImpl clientSocketFactory = new RMIClientSocketFactoryImpl(serverAddress); + env.put(RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, serverSocketFactory); + env.put(RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, clientSocketFactory); + } + + @Override + public void configureSslClientSocketFactory(Map<String, Object> env, InetAddress serverAddress) + { + RMISslClientSocketFactoryImpl clientFactory = new RMISslClientSocketFactoryImpl(serverAddress, + JAVAX_RMI_SSL_CLIENT_ENABLED_CIPHER_SUITES.getString(), + JAVAX_RMI_SSL_CLIENT_ENABLED_PROTOCOLS.getString()); + env.put(RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, clientFactory); + env.put("com.sun.jndi.rmi.factory.socket", clientFactory); + } + + @Override + public void configureSslServerSocketFactory(Map<String, Object> env, InetAddress serverAddress, String[] enabledCipherSuites, + String[] enabledProtocols, boolean needClientAuth, SSLContext sslContext) + { + CollectingSslRMIServerSocketFactoryImpl serverFactory = new CollectingSslRMIServerSocketFactoryImpl(serverAddress, + enabledCipherSuites, + enabledProtocols, + needClientAuth, + sslContext); + env.put(RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, serverFactory); + logJmxSslConfig(serverFactory); + } + + private void logJmxSslConfig(CollectingSslRMIServerSocketFactoryImpl serverFactory) + { + if (logger.isDebugEnabled()) + logger.debug("JMX SSL configuration. { protocols: [{}], cipher_suites: [{}], require_client_auth: {} }", + serverFactory.getEnabledProtocols() == null ? "'JVM defaults'" : Arrays.stream(serverFactory.getEnabledProtocols()).collect(Collectors.joining("','", "'", "'")), + serverFactory.getEnabledCipherSuites() == null ? "'JVM defaults'" : Arrays.stream(serverFactory.getEnabledCipherSuites()).collect(Collectors.joining("','", "'", "'")), + serverFactory.isNeedClientAuth()); + } +} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
