incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1005435 - /sling/whiteboard/fmeschbe/jmx-whiteboard/src/main/java/org/apache/aries/jmx/whiteboard/JmxWhiteboardSupport.java
Date Thu, 07 Oct 2010 12:56:39 GMT
Author: fmeschbe
Date: Thu Oct  7 12:56:39 2010
New Revision: 1005435

URL: http://svn.apache.org/viewvc?rev=1005435&view=rev
Log:
ARIES-430 Synchronize methods and log at DEBUG instead of INFO level

Modified:
    sling/whiteboard/fmeschbe/jmx-whiteboard/src/main/java/org/apache/aries/jmx/whiteboard/JmxWhiteboardSupport.java

Modified: sling/whiteboard/fmeschbe/jmx-whiteboard/src/main/java/org/apache/aries/jmx/whiteboard/JmxWhiteboardSupport.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/fmeschbe/jmx-whiteboard/src/main/java/org/apache/aries/jmx/whiteboard/JmxWhiteboardSupport.java?rev=1005435&r1=1005434&r2=1005435&view=diff
==============================================================================
--- sling/whiteboard/fmeschbe/jmx-whiteboard/src/main/java/org/apache/aries/jmx/whiteboard/JmxWhiteboardSupport.java
(original)
+++ sling/whiteboard/fmeschbe/jmx-whiteboard/src/main/java/org/apache/aries/jmx/whiteboard/JmxWhiteboardSupport.java
Thu Oct  7 12:56:39 2010
@@ -42,9 +42,9 @@ class JmxWhiteboardSupport {
 
     private final HashMap<MBeanHolder, MBeanHolder> mbeans = new HashMap<MBeanHolder,
MBeanHolder>();
 
-    protected void addMBeanServer(final MBeanServer mbeanServer) {
+    protected synchronized void addMBeanServer(final MBeanServer mbeanServer) {
 
-        log.info("addMBeanServer: Adding MBeanServer " + mbeanServer);
+        log.debug("addMBeanServer: Adding MBeanServer {}", mbeanServer);
 
         ArrayList<MBeanServer> serverList = new ArrayList<MBeanServer>(
             Arrays.asList(mbeanServers));
@@ -57,9 +57,9 @@ class JmxWhiteboardSupport {
         }
     }
 
-    protected void removeMBeanServer(final MBeanServer mbeanServer) {
+    protected synchronized void removeMBeanServer(final MBeanServer mbeanServer) {
 
-        log.info("removeMBeanServer: Removing MBeanServer " + mbeanServer);
+        log.debug("removeMBeanServer: Removing MBeanServer {}", mbeanServer);
 
         // remove all dynamically registered mbeans from the server
         for (MBeanHolder mbean : mbeans.values()) {
@@ -72,9 +72,9 @@ class JmxWhiteboardSupport {
         mbeanServers = serverList.toArray(new MBeanServer[serverList.size()]);
     }
 
-    protected void registerMBean(Object mbean, final ServiceReference props) {
+    protected synchronized void registerMBean(Object mbean, final ServiceReference props)
{
 
-        log.info("registerMBean: Adding MBean " + mbean);
+        log.debug("registerMBean: Adding MBean {}", mbean);
 
         ObjectName objectName = getObjectName(props);
         if (objectName != null || mbean instanceof MBeanRegistration) {
@@ -87,9 +87,9 @@ class JmxWhiteboardSupport {
         }
     }
 
-    protected void unregisterMBean(Object mbean) {
+    protected synchronized void unregisterMBean(Object mbean) {
 
-        log.info("unregisterMBean: Removing MBean " + mbean);
+        log.debug("unregisterMBean: Removing MBean {}", mbean);
 
         final MBeanHolder holder = mbeans.remove(new MBeanHolder(mbean, null));
         if (holder != null) {



Mime
View raw message