I have done some performance tests and have compared two scenarios.

1. Getting 100,000 times 8 properties from an mbean.
2. Getting 100,000 times 8 propeties by a simple getter method.

My results are like this :

10:55:08,535 INFO  [STDOUT] property Time :31 msec
10:55:44,913 INFO  [STDOUT] JMX Time :36378 msec

does that means I should cache the configuration properties i get from MBeans? or is 
there something bad with my code?

A sample code of getting a property from an MBean that I used :


  |   public String getEmailProtocol() {
  |     String value = "imap";
  |     try {
  |       value = _mBeanServer.getAttribute(_objectName, "EmailProtocol").toString();
  |     } catch (AttributeNotFoundException e) {
  |       _log.error(e.getMessage(), e);
  |     } catch (InstanceNotFoundException e) {
  |       _log.error(e.getMessage(), e);
  |     } catch (MBeanException e) {
  |       _log.error(e.getMessage(), e);
  |     } catch (ReflectionException e) {
  |       _log.error(e.getMessage(), e);
  |     }
  |     return (value);
  |   }
  | 

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

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


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to