Skip to main content

MBeans definition and registering using annotations only

1 reply [Last post]
PiotrNowicki
Offline
Joined: 2012-11-21
Points: 0

Hello Everybody,

Is it possible to define and register a MBean using annotations only?

I think that the @MBean, @ManagedOperation, etc. used to be in the JDK 7 but for some reason - they're not (http://docs.oracle.com/javase/7/docs/api/javax/management/package-summar...).

Is there any Glassfish proprietary way of annotating MBeans, exposing their operations and attributes and registering it so there is no need for the developer to invoke any of this:

ManagementFactory.getPlatformMBeanServer().registerMBean(myBean, new ObjectName(myMBeanName));

Are there any information about JMX 2.0 progress?
Will it ever arrive?

Thanks in advance,
Piotr

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
PiotrNowicki
Offline
Joined: 2012-11-21
Points: 0

To add - JBoss seems to have similar approach using its own annotations (http://docs.jboss.org/ejb3/app-server/reference/build/reference/en/html/...) e.g. where you can define the objectName.

Are there any plans to make this standardized?