Questions tagged [mbeans]

MBeans are JMX beans, NOT JSF/CDI/Spring/etc "managed beans". For that, use [managed-bean] tag instead.

(Mbean) Java Management Extensions (JMX) is a Java technology that supplies tools for managing and monitoring applications, system objects, devices (e. g. printers) and service oriented networks.

The MBean represents a resource running in the Java virtual machine, such as an application or a Java EE technical service (transactional monitor, JDBC driver, etc.). They can be used for collecting statistics on concerns like performance, resources usage, or problems (pull); for getting and setting application configurations or properties (push/pull); and notifying events like faults or state changes (push).

354 questions
54
votes
4 answers

Difference between MBean and MXBean

I have the following questions regarding MBean and MXBean: What is the difference between MBean and MXBean? What are the use cases for MBean and MXBean?
Denim Datta
  • 3,740
  • 3
  • 27
  • 53
21
votes
4 answers

JBoss AS 7 JMX Console

I spent some time checking out JBoss AS7 today. I am impressed with what I have seen so far but I noticed that good ol' JMX-Console no longer exist. Does anyone know why it was left out? I understand that I can connect through JConsole, MC4J etc.…
helios
  • 2,603
  • 4
  • 21
  • 26
19
votes
6 answers

How to add a file to EAR META-INF folder - Maven

I want to move a startup MBEAN file (startup-client-service.xml) from my EJB >META-INF, to EAR> META-INF folder. I tried with the maven-resources-plugin plugin but it just copy the file from EJB >META-INF to Target in ear folder. But in built ear…
user2771655
  • 1,052
  • 3
  • 20
  • 38
16
votes
8 answers

Creating MBean in Java

I am trying to make a class implement an MBean Interface so I can interrogate the properties at runtime. The class I am trying to interrogate is as follows public class ProfileCache implements ProfileCacheInterfaceMBean{ private Logger logger =…
Biscuit128
  • 5,218
  • 22
  • 89
  • 149
16
votes
1 answer

JBoss SAR vs EAR/WAR packaging

When would I choose to deploy as a JBoss SAR instead of an EAR? This is more of a general question and I'm looking for guidelines that explain the pros and cons of each deployment model and which one is applicable when.
nemo
  • 1,504
  • 3
  • 21
  • 41
14
votes
2 answers

Port MBean from JBoss 4.x to JBoss 7

we're currently in the process of porting some of our projects from JBoss 4.x to JBoss 7. So far everything seems to work fine, except for our MBeans, which we're commonly using to provide simple management operations. I've been searching for quite…
Thomas
  • 87,414
  • 12
  • 119
  • 157
12
votes
1 answer

How to get bound server address and port programmatically in Java EE?

At startup we need to get the server address and the http port of the running application. Until now we made it like this: MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer(); ObjectName socketBindingMBean = new…
Marcel
  • 4,054
  • 5
  • 36
  • 50
11
votes
1 answer

How should I access a JMX MBeanServer running in the same VM?

For a simple Java library which performs operations in constant intervals I have implemented JMX management using MXBeans and it works as expected, I can query the status and set parameters, supend / resume the operations etc in JConsole. Now I…
mjn
  • 36,362
  • 28
  • 176
  • 378
11
votes
1 answer

When using a JMX server with ephemeral port, how to get the server port number?

When launching a Java application with these…
nicoulaj
  • 3,463
  • 4
  • 27
  • 32
11
votes
1 answer

What is the difference between a standard MBean and dynamic MBean?

What is the different between: Standard MBeans Dynamic MBeans What are the pros and cons of each and when should we choose either of these two components to manage a resource?
Geek
  • 26,489
  • 43
  • 149
  • 227
11
votes
5 answers

Accessing a remote MBean server

I am running a client/server application using JBoss. How can I connect to the server JVM's MBeanServer? I want to use the MemoryMX MBean to track the memory consumption. I can connect to the JBoss MBeanServer using JNDI lookup but the…
parkr
  • 3,188
  • 5
  • 35
  • 39
11
votes
1 answer

Why are some methods on the JConsole disabled

I can see that some methods on the jconsole are disabled. Given below is the screenshot for com.sun.management.ThreadMXBean The javadocs for these MBean methods do not specify anything about the accessibility part. I think it is a security feature,…
Ajay George
  • 11,759
  • 1
  • 40
  • 48
9
votes
2 answers

java.lang.NoSuchMethodError during invoking quartz job declared inside jboss mbean

I've two ears deployed on one jboss instance. I'm using quartz configured inside mbean. Both of the ears are using StatefulJobs. Unfortunately one is using library antlr-runtime-3.0, but the second one antlr-runtime-3.2. When JBoss is invoking the…
Marcin Erbel
  • 1,597
  • 6
  • 32
  • 51
8
votes
1 answer

ManagementFactory.getPlatformMBeanServer() vs MBeanServerFactory.createMBeanServer()

Can anyone please clarify what the differences are between the two? The Javadoc is really obscure for my proper understanding. One thing I have noticed is if I use ManagementFactory.getPlatformMBeanServer() to register my MBeans, I can view them in…
His
  • 5,891
  • 15
  • 61
  • 82
8
votes
2 answers

Automatically starting a JBoss service (MBean)

I'm trying to build a JBoss service that should be started automatically, each time the server is initiated. I've got the following class structure for my service: public interface CumbiaXPMServiceMBean extends org.jboss.system.ServiceMBean public…
nozebacle
  • 396
  • 1
  • 5
  • 16
1
2 3
23 24