Questions tagged [spring-jmx]

The JMX support in Spring provides you with the features to easily and transparently integrate your Spring application into a JMX infrastructure.

Spring’s JMX support provides four core features:

  • The automatic registration of any Spring bean as a JMX MBean A
  • flexible mechanism for controlling the management interface of your
  • beans The declarative exposure of MBeans over remote, JSR-160
  • connectors The simple proxying of both local and remote MBean resources

These features are designed to work without coupling your application components to either Spring or JMX interfaces and classes. Indeed, for the most part your application classes need not be aware of either Spring or JMX in order to take advantage of the Spring JMX features.

See the Spring Framework Reference Documentation for more information.

Resources

122 questions
2
votes
3 answers

Exposing Collection from ManagedResource bean?

@ManagedResource @Component public class MyBean { Map map = new HashMap(); @ManagedAttribute public Collection getFoo() { return map.values(); } } The foo attributed shows as…
IttayD
  • 28,271
  • 28
  • 124
  • 178
2
votes
2 answers

Spring datasource connection manager with jmx to expose real time connections count

Using java/Spring/Ibatis sqlserver is the database and datasource is org.apache.commons.dbcp.BasicDataSource following is the data source object i want to expose real time connection pool count like how many are right now in use and how many in idle…
d-man
  • 57,473
  • 85
  • 212
  • 296
1
vote
1 answer

Why is Spring Boot 2.5.0 JMX Beans not showing in JConsole

Using Spring Boot 2.1.6.RELEASE for JMX Beans are working correctly or they are shown in Jconsole but in 2.5.0 it does not. The following is my simple application using spring boot 2.5.0. If you want to try version 2.1.6.RELEASE, just change the…
paul
  • 372
  • 4
  • 17
1
vote
1 answer

What is the exact purpose for spring.jmx.enabled?

For Spring Boot (v2.4.2), in the Monitoring and Management over JMX section indicates: Java Management Extensions (JMX) provide a standard mechanism to monitor and manage applications. By default, this feature is not enabled and can be turned on by…
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
1
vote
0 answers

Spring Boot Out of Memory Due to Kafka Common Metrics

We have a Spring Boot app, which went Out of Heap Memory Last Week. Since the HeapDumpOnOutOfMemory flag was enabled, we could see in a 4GB Heap, around 3.7GB space was occupied by com.sun.jmx.mbeanserver.NamedObject. All these Objects had key/value…
1
vote
1 answer

camel mbean management objects doesn't appear by default

I use camel 3.3.0 with spring boot 2.3.1. Considering documentation camel mbeans management objects for camel routes should be appeared by default, but it doesn't happen. I have tried to add to application.properties all properties with jmx, but it…
typik89
  • 907
  • 1
  • 10
  • 23
1
vote
1 answer

How to expose Kafka metrics from SpringBoot application through JMX to Prometheus?

I have a springboot app from which i would like to expose the kafka.consumer metrics to Prometheus via JMX. I can see the metrics here but i just don't know where to set those mBeans(i.e. kafka.consumer:type=consumer-metrics,client-id=([-.\w]+)). I…
Charles
  • 570
  • 11
  • 29
1
vote
1 answer

Spring Boot @ManagedResource component is not visible in VisualVM when launched in Docker but works locally

The issue is very straightforward to reproduce. I have a Spring component: @Component @ManagedResource public class EncryptionUtil { ... @ManagedOperation public String encrypt(String plain) { ... } @ManagedOperation …
Serhii Povísenko
  • 3,352
  • 1
  • 30
  • 48
1
vote
0 answers

JMX configuration for SSL - getting "java.rmi.ConnectException: Connection refused to host: "

My application is spring boot application. I have been accessing it through JMX simple file-based authentication, but I am trying to changed to SSL enabled configuration. Here is my properties for JMX. It has been working fine with file-based…
user826323
  • 2,248
  • 6
  • 43
  • 70
1
vote
1 answer

Spring Boot 2 application cannot overwrite RMIRegistry default port 1099 to make JMX connections safe

Unfortunately, our Spring Boot 2 Application exposes the RMI Registry default port 1099 and our security team complains about that. We expect that JMX should exclusively be used via port 8999 in a safe manner. Currently, you can connect in both ways…
kladderradatsch
  • 596
  • 5
  • 18
1
vote
1 answer

IntegrationMBeanExporter.stopActiveComponents() together with gcp pub/sub producer is throwing loads of InterruptedExceptions

We have the following (simplified) flow: -> inbound FILE API reading files from remote server, with fixed poller -> splitter, connected via direct channel -> GCP pub/sub producer, reading messages one by one from splitter and publishing them to GCP…
1
vote
0 answers

Adding `-Dcom.sun.management.jmxremote` as VM argument stops the server

So I have been facing issue when I add -Dcom.sun.management.jmxremote to my server vm arguments, it just stops. Is there something obvious that I am missing ? FYI - This is a spring boot application. Here's how I am starting the server java \ >…
Sagar
  • 5,315
  • 6
  • 37
  • 66
1
vote
2 answers

How to connect to local application via jconsole using remote process?

I have ordinary spring boot application and am able to connect to that application using jconsole when I choose it from the Local Processes group: But I want to connect to my application remotely. Firstly I want to connect from the same PC but…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
1
vote
0 answers

InstanceNotFoundException when trying to get Activemq MBean

I have the following configuration: @Configuration public class ConfigureRMI { @Value("${jmx.rmi.host:localhost}") private String rmiHost; @Value("${jmx.rmi.port:1099}") private Integer rmiPort; @Bean public…
ba3a
  • 330
  • 1
  • 6
  • 17
1
vote
1 answer

Exporting a lazily initialized bean (which implements SelfNaming and is annotated with ManagedResource annotation) gives IllegalStateException

I'm having a bean that is annotated with ManagedResource lazily initialized implements SelfNaming I'm exporting it using spring's AnnotationMBeanExporter. All this works good when I'm using spring version 4.3.16.RELEASE, but when I upgraded my…
Lavish Kothari
  • 2,211
  • 21
  • 29
1 2
3
8 9