You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by fm...@apache.org on 2012/01/05 11:25:43 UTC
svn commit: r1227542 -
/aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/AbstractCompendiumHandler.java
Author: fmeschbe
Date: Thu Jan 5 10:25:43 2012
New Revision: 1227542
URL: http://svn.apache.org/viewvc?rev=1227542&view=rev
Log:
ARIES-782 Use trackedId instead of tracking count to see whether the service has already been registered
Modified:
aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/AbstractCompendiumHandler.java
Modified: aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/AbstractCompendiumHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/AbstractCompendiumHandler.java?rev=1227542&r1=1227541&r2=1227542&view=diff
==============================================================================
--- aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/AbstractCompendiumHandler.java (original)
+++ aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/AbstractCompendiumHandler.java Thu Jan 5 10:25:43 2012
@@ -76,8 +76,8 @@ public abstract class AbstractCompendium
Long serviceId = (Long) reference.getProperty(Constants.SERVICE_ID);
//API stipulates versions for compendium services with static ObjectName
//This shouldn't happen but added as a consistency check
- if (getTrackingCount() > 0) {
- String serviceDescription = (String) ((reference.getProperty(Constants.SERVICE_DESCRIPTION) != null) ?
+ if (trackedId != null) {
+ String serviceDescription = (String) ((reference.getProperty(Constants.SERVICE_DESCRIPTION) != null) ?
reference.getProperty(Constants.SERVICE_DESCRIPTION) : reference.getProperty(Constants.OBJECTCLASS));
logger.log(LogService.LOG_WARNING, "Detected secondary ServiceReference for [" + serviceDescription
+ "] with " + Constants.SERVICE_ID + " [" + serviceId + "] Only 1 instance will be JMX managed");