[jboss-user] [Microcontainer] - Re: BeanMetaData and management

alesj do-not-reply at jboss.com
Mon Nov 24 09:32:34 EST 2008


"bob.mcwhirter" wrote : 
  | My "already installed" error occurs when I get the @JMX annotation on the correct class, but give my object a bogus MC bean name (in this case "jboss.rails:name=oddthesis").
  | 
This is the code that creates the name:
 - http://anonsvn.jboss.org/repos/jbossas/trunk/system-jmx/src/main/org/jboss/system/microcontainer/jmx/AbstractServiceControllerLifecycleCallback.java
If your bean name contains ':' it's gonna be used.

"bob.mcwhirter" wrote : 
  | The error I was getting is here, in case you're interested.  "Already installed" was somewhat confusing of an error to get.
  | 
  | http://oddthesis.pastebin.com/f46537bdf
  | 
You have duplicated name.
Your bean and mbean are named the same, hence MC Controller complained.

Thinking about how we create the name, it's not very good.
I'll raise an issue about this.

"bob.mcwhirter" wrote : 
  | I see I can set the 'name' parameter on @JMX, but is there another way to dynamically set the JMX object-name (to include some bit of unit.getSimpleName() perhaps) like I think the @ManagementObjectID annotation supports on that side of things?  Ultimately, I think I'd like to end up with "jboss.rails:name=#{unit.getSimpleName()}" or similar.
  | 
The problem here is that when @JMX interceptor kicks in,
you don't have access to DeploymentUnit, since you might even not have any DU.
e.g. programmatic ControllerContext installation

But I'll check what can be done,
to make name creation as configurable as possible.
e.g. pulling some info from CC's MetaData

"bob.mcwhirter" wrote : 
  | Or should I give up, admit JMX is dead, and move on?
  | 
It depends how much work is there.
For now I would still use it.
But as soon as you see some lively movement in jopr/embedded wrt PS,
I would change to ManagedObject.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191766#4191766

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4191766



More information about the jboss-user mailing list