Changeset 6048

Show
Ignore:
Timestamp:
11/14/11 11:48:28 (6 months ago)
Author:
mtld
Message:

fixed live class statistics

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pustefix-core/src/main/java/org/pustefixframework/http/PustefixInternalsRequestHandler.java

    r5929 r6048  
    422422        } 
    423423        MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer(); 
     424        boolean checkLiveClasses = mbeanServer.isRegistered(name); 
    424425        String[] signature = new String[] {"java.lang.String"}; 
    425426         
     
    439440                int ind = jarPath.lastIndexOf('!'); 
    440441                if(ind > -1) jarPath = jarPath.substring(0, ind); 
    441                 String result = (String)mbeanServer.invoke(name, "getLiveLocation", new Object[] {jarPath}, signature); 
    442                 if(result != null) elem.setAttribute("classurl", result); 
     442                if(checkLiveClasses) { 
     443                    String result = (String)mbeanServer.invoke(name, "getLiveLocation", new Object[] {jarPath}, signature); 
     444                    if(result != null) elem.setAttribute("classurl", result); 
     445                } 
    443446            } catch(Exception x) { 
    444447                LOG.warn("Error while getting live location", x);