Guest User

Untitled

a guest
May 15th, 2012
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. JMX get MBeanAttributeInfo of specific attribute directly
  2. //server is an MBeanServer
  3. MBeanAttributeInfo[] infos = server.getMBeanInfo(new ObjectName("jboss:service=Mail"));
  4. for(MBeanAttributeInfo info : infos) {
  5. if(info.getName().equals("State")) {
  6. if(info.isWritable()) {
  7. //do something
  8. }
  9. break;
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment