This content has been marked as final.
Show 4 replies
-
1. Re: Retrieve ObjectName of webapp without id
peterj Feb 19, 2007 12:25 PM (in response to chicklin)The "jboss.web.deployment:war=file.war,*" should work. Are you using the MBeanServerConnection.queryNames() method? That should return a Set of ObjectName objects that match the query.
-
2. Re: Retrieve ObjectName of webapp without id
chicklin Feb 19, 2007 5:45 PM (in response to chicklin)This is what I'm using to query my services (e.g. an SMTP service):
ObjectName smtpService = new ObjectName("domain.com:service=SmtpService"); setSmtpStatus((String)server.getAttribute(smtpService, "StateString"));
-
3. Re: Retrieve ObjectName of webapp without id
peterj Feb 19, 2007 6:02 PM (in response to chicklin)Like I said, you need to use the queryNames method to get all mbean names what match a wild card. For example:
ObjectName on = new ObjectName("jboss.web.deployment:war=file.war,*");
Set mv = server.queryNames(on, null);
Each entry in mv is an ObjectName of a matching mbean. In this case, there should be at most one name in the set. -
4. Re: Retrieve ObjectName of webapp without id
chicklin Feb 19, 2007 8:16 PM (in response to chicklin)That did the trick. Thanks!