mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-5213 - fix failing jmock test - resolve inconsistency in camel case attribute naming in a few mbeans
This commit is contained in:
parent
6348d11976
commit
0709c2cc1d
|
@ -113,7 +113,7 @@ public class BrokerMBeanSupport {
|
|||
String objectNameStr = brokerObjectName;
|
||||
|
||||
objectNameStr += "," + "transactionType=RecoveredXaTransaction";
|
||||
objectNameStr += "," + "Xid=" + JMXSupport.encodeObjectNamePart(transaction.getTransactionId().toString());
|
||||
objectNameStr += "," + "xid=" + JMXSupport.encodeObjectNamePart(transaction.getTransactionId().toString());
|
||||
|
||||
return new ObjectName(objectNameStr);
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ public class BrokerMBeanSupport {
|
|||
public static ObjectName createLog4JConfigViewName(String brokerObjectName) throws MalformedObjectNameException {
|
||||
String objectNameStr = brokerObjectName;
|
||||
|
||||
objectNameStr += "," + "Service=Log4JConfiguration";
|
||||
objectNameStr += "," + "service=Log4JConfiguration";
|
||||
|
||||
return new ObjectName(objectNameStr);
|
||||
}
|
||||
|
@ -129,8 +129,8 @@ public class BrokerMBeanSupport {
|
|||
public static ObjectName createPersistenceAdapterName(String brokerObjectName, String name) throws MalformedObjectNameException {
|
||||
String objectNameStr = brokerObjectName;
|
||||
|
||||
objectNameStr += "," + "Service=PersistenceAdapter";
|
||||
objectNameStr += "," + "InstanceName=" + JMXSupport.encodeObjectNamePart(name);
|
||||
objectNameStr += "," + "service=PersistenceAdapter";
|
||||
objectNameStr += "," + "instanceName=" + JMXSupport.encodeObjectNamePart(name);
|
||||
|
||||
return new ObjectName(objectNameStr);
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ public class BrokerMBeanSupport {
|
|||
|
||||
public static ObjectName createAbortSlowConsumerStrategyName(String brokerObjectName, AbortSlowConsumerStrategy strategy) throws MalformedObjectNameException {
|
||||
String objectNameStr = brokerObjectName;
|
||||
objectNameStr += ",Service=SlowConsumerStrategy,InstanceName="+ JMXSupport.encodeObjectNamePart(strategy.getName());
|
||||
objectNameStr += ",service=SlowConsumerStrategy,instanceName="+ JMXSupport.encodeObjectNamePart(strategy.getName());
|
||||
ObjectName objectName = new ObjectName(objectNameStr);
|
||||
return objectName;
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ public class BrokerMBeanSupport {
|
|||
|
||||
public static ObjectName createJmsConnectorName(String brokerObjectName, String type, String name) throws MalformedObjectNameException {
|
||||
String objectNameStr = brokerObjectName;
|
||||
objectNameStr += ",connector=" + type + ",JmsConnectors="+ JMXSupport.encodeObjectNamePart(name);
|
||||
objectNameStr += ",connector=" + type + ",jmsConnectors="+ JMXSupport.encodeObjectNamePart(name);
|
||||
ObjectName objectName = new ObjectName(objectNameStr);
|
||||
return objectName;
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ public class XARecoveryBrokerTest extends BrokerRestartTestSupport {
|
|||
|
||||
private RecoveredXATransactionViewMBean getProxyToPreparedTransactionViewMBean(TransactionId xid) throws MalformedObjectNameException, JMSException {
|
||||
|
||||
ObjectName objectName = new ObjectName("org.apache.activemq:type=Broker,brokerName=localhost,transactionType=RecoveredXaTransaction,Xid=" +
|
||||
ObjectName objectName = new ObjectName("org.apache.activemq:type=Broker,brokerName=localhost,transactionType=RecoveredXaTransaction,xid=" +
|
||||
JMXSupport.encodeObjectNamePart(xid.toString()));
|
||||
RecoveredXATransactionViewMBean proxy = (RecoveredXATransactionViewMBean) broker.getManagementContext().newProxyInstance(objectName,
|
||||
RecoveredXATransactionViewMBean.class, true);
|
||||
|
|
|
@ -118,6 +118,8 @@ public class DiscoveryNetworkReconnectTest {
|
|||
new ObjectName("Test:type=Broker,brokerName=BrokerNC,service=Health"))));
|
||||
allowing(managementContext).registerMBean(with(any(Object.class)), with(equal(
|
||||
new ObjectName("Test:type=Broker,brokerName=BrokerNC,connector=networkConnectors,networkConnectorName=NC"))));
|
||||
allowing(managementContext).registerMBean(with(any(Object.class)), with(equal(
|
||||
new ObjectName("Test:type=Broker,brokerName=BrokerNC,service=Log4JConfiguration"))));
|
||||
allowing(managementContext).registerMBean(with(any(Object.class)), with(equal(
|
||||
new ObjectName("Test:type=Broker,brokerName=BrokerNC,destinationType=Topic,destinationName=ActiveMQ.Advisory.Connection"))));
|
||||
allowing(managementContext).registerMBean(with(any(Object.class)), with(equal(
|
||||
|
@ -154,6 +156,8 @@ public class DiscoveryNetworkReconnectTest {
|
|||
new ObjectName("Test:type=Broker,brokerName=BrokerNC,service=Health"))));
|
||||
allowing(managementContext).unregisterMBean(with(equal(
|
||||
new ObjectName("Test:type=Broker,brokerName=BrokerNC,connector=networkConnectors,networkConnectorName=NC"))));
|
||||
allowing(managementContext).unregisterMBean(with(equal(
|
||||
new ObjectName("Test:type=Broker,brokerName=BrokerNC,service=Log4JConfiguration"))));
|
||||
allowing(managementContext).unregisterMBean(with(equal(
|
||||
new ObjectName("Test:type=Broker,brokerName=BrokerNC,destinationType=Topic,destinationName=ActiveMQ.Advisory.Connection"))));
|
||||
allowing(managementContext).unregisterMBean(with(equal(
|
||||
|
|
Loading…
Reference in New Issue