Skip to content

Deprecate JMX support. #4936

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>4.5.0-SNAPSHOT</version>
<version>4.5.0-GH-4927-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Spring Data MongoDB</name>
Expand Down
2 changes: 1 addition & 1 deletion spring-data-mongodb-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>4.5.0-SNAPSHOT</version>
<version>4.5.0-GH-4927-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion spring-data-mongodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>4.5.0-SNAPSHOT</version>
<version>4.5.0-GH-4927-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
* @author John Brisbin
* @author Oliver Gierke
* @author Christoph Strobl
* @deprecated since 4.5
*/
@Deprecated(since = "4.5", forRemoval = true)
public class MongoJmxParser implements BeanDefinitionParser {

public BeanDefinition parse(Element element, ParserContext parserContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
* @author Thomas Darimont
* @author Mark Paluch
* @author Christoph Strobl
* @deprecated since 4.5
*/
@Deprecated(since = "4.5", forRemoval = true)
@ManagedResource(description = "Mongo Admin Operations")
public class MongoAdmin implements MongoAdminOperations {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* @author Mark Pollack
* @author Oliver Gierke
*/
@Deprecated(since = "4.5", forRemoval = true)
public interface MongoAdminOperations {

@ManagedOperation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
* @author Mark Pollack
* @author Oliver Gierke
* @author Christoph Strobl
* @deprecated since 4.5
*/
@Deprecated(since = "4.5", forRemoval = true)
public abstract class AbstractMonitor {

private final MongoClient mongoClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
* JMX Metrics for assertions
*
* @author Mark Pollack
* @deprecated since 4.5
*/
@Deprecated(since = "4.5", forRemoval = true)
@ManagedResource(description = "Assertion Metrics")
public class AssertMetrics extends AbstractMonitor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
* JMX Metrics for Background Flushing
*
* @author Mark Pollack
* @deprecated since 4.5
*/
@Deprecated(since = "4.5", forRemoval = true)
@ManagedResource(description = "Background Flushing Metrics")
public class BackgroundFlushingMetrics extends AbstractMonitor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
* JMX Metrics for B-tree index counters
*
* @author Mark Pollack
* @deprecated since 4.5
*/
@Deprecated(since = "4.5", forRemoval = true)
@ManagedResource(description = "Btree Metrics")
public class BtreeIndexCounters extends AbstractMonitor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
* JMX Metrics for Connections
*
* @author Mark Pollack
* @deprecated since 4.5
*/
@Deprecated(since = "4.5", forRemoval = true)
@ManagedResource(description = "Connection metrics")
public class ConnectionMetrics extends AbstractMonitor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
* JMX Metrics for Global Locks
*
* @author Mark Pollack
* @deprecated since 4.5
*/
@Deprecated(since = "4.5", forRemoval = true)
@ManagedResource(description = "Global Lock Metrics")
public class GlobalLockMetrics extends AbstractMonitor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
* JMX Metrics for Memory
*
* @author Mark Pollack
* @deprecated since 4.5
*/
@Deprecated(since = "4.5", forRemoval = true)
@ManagedResource(description = "Memory Metrics")
public class MemoryMetrics extends AbstractMonitor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
* JMX Metrics for Operation counters
*
* @author Mark Pollack
* @deprecated since 4.5
*/
@Deprecated(since = "4.5", forRemoval = true)
@ManagedResource(description = "Operation Counters")
public class OperationCounters extends AbstractMonitor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
* @author Mark Pollack
* @author Thomas Darimont
* @author Christoph Strobl
* @deprecated since 4.5
*/
@Deprecated(since = "4.5", forRemoval = true)
@ManagedResource(description = "Server Information")
public class ServerInfo extends AbstractMonitor {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* MongoDB specific JMX monitoring support.
*/
@Deprecated(since = "4.5", forRemoval = true)
@org.springframework.lang.NonNullApi
package org.springframework.data.mongodb.monitor;

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
*
* @author Mark Pollack
* @author Oliver Gierke
* @deprecated since 4.5.
*/
@Deprecated(since = "4.5", forRemoval = true)
public class JmxServer {

public static void main(String[] args) {
Expand Down
6 changes: 6 additions & 0 deletions src/main/antora/modules/ROOT/pages/mongodb/jmx.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
[[mongo.jmx]]
= JMX support

[NOTE]
====
JMX support has been deprecated in 4.5 and will be removed in 5.0. +
We recommend switching to Spring Boot https://docs.spring.io/spring-boot/reference/actuator/endpoints.html[Actuator Endpoints] and expose those over JMX if needed.
====

The JMX support for MongoDB exposes the results of running the 'serverStatus' command on the admin database for a single MongoDB server instance. It also exposes an administrative MBean, `MongoAdmin`, that lets you perform administrative operations, such as dropping or creating a database. The JMX features build upon the JMX feature set available in the Spring Framework. See link:{springDocsUrl}/integration.html#jmx[here] for more details.

[[mongodb:jmx-configuration]]
Expand Down