resolve leveldb store jmx issues and use the proper mbean naming

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1435163 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2013-01-18 14:38:01 +00:00
parent 94f71ccf40
commit f5360a727d
2 changed files with 3 additions and 4 deletions

View File

@ -31,7 +31,7 @@ import java.util._
import collection.mutable.ListBuffer
import concurrent.CountDownLatch
import javax.management.ObjectName
import org.apache.activemq.broker.jmx.AnnotatedMBean
import org.apache.activemq.broker.jmx.{BrokerMBeanSupport, AnnotatedMBean}
import org.apache.activemq.util._
import org.apache.activemq.leveldb.util.{RetrySupport, FileSupport, Log}
import org.apache.activemq.store.PList.PListIterator
@ -171,13 +171,12 @@ class LevelDBStore extends LockableServiceSupport with BrokerServiceAware with P
}
override def toString: String = {
return "LevelDB:[" + directory.getAbsolutePath + "]"
return "LevelDB[" + directory.getAbsolutePath + "]"
}
def objectName = {
var brokerON = brokerService.getBrokerObjectName
new ObjectName(brokerON.toString() +",persistentAdapter=LevelDBStore");
BrokerMBeanSupport.createPersistenceAdapterName(brokerON.toString, this.toString)
}
def retry[T](func : =>T):T = RetrySupport.retry(LevelDBStore, isStarted, func _)