title: glassfish 3.1.2 monitoring EJB container, bean-methods
body: <p>the glassfish application server provides a nice monitoring REST interface.
  To use it u can enable several monitorable items in the admin console, for example the EJB container. The documentation says, you can retreive EJB-statistics for every deployed application.</p>
  
  <p>If you request a URL like <strong>localhost:4848/monitoring/domain1/server/applications/<em>APPNAME/EJBNAME</em></strong> you will get statistics for a given EJB of the application.</p>
  
  <p>Further, there is a possibility to look more deeply into each bean-method of the ejb, for example the <strong>executiontime</strong>, about which the documentation says:<br>
  <em>"Time, in milliseconds, spent executing the method for the last successful/unsuccessful attempt to run the operation. This is collected for stateless and stateful session beans and entity beans <strong>if monitoring is enabled on the EJB container.</strong>"</em></p>
  
  <p>The problem now is, monitoring is enabled on the EJB-container (Level set to HIGH), but nothing is sampled in any bean-method in any EJB in any deployed application.</p>
  
  <p>Is there something special to do in the bean and/or the glassfish ?</p>
  
  <p>Thanks in advance for help,</p>
  
  <p>Chris</p>
  
  <p>EDIT:</p>
  
  <p>Ok, I noticed something more about that behaviour:</p>
  
  <p>In the server log you get a log message for each deployed EJB like that:</p>
  
  <pre><code>INFO: EJB5181:Portable JNDI names for EJB DataFetcher // ...
  </code></pre>
  
  <p>If I set the ejb-container monitoring level to HIGH (which is what I want to do), I get the following warning for each deployed EJB, regardless which app I deploy:</p>
  
  <pre><code>WARNING: MNTG0201:Flashlight listener registration failed for listener class : com.sun.ejb.monitoring.stats.StatelessSessionBeanStatsProvider , will retry later 
  </code></pre>
  
  <p>I googled the warning but none of the resulst really help me enabling EJB monitoring...</p>