activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject git commit: https://issues.apache.org/jira/browse/AMQ-5213 - fix failing jmock test - resolve inconsistency in camel case attribute naming in a few mbeans
Date Thu, 10 Jul 2014 12:51:38 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk 6348d1197 -> 0709c2cc1


https://issues.apache.org/jira/browse/AMQ-5213 - fix failing jmock test - resolve inconsistency
in camel case attribute naming in a few mbeans


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/0709c2cc
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/0709c2cc
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/0709c2cc

Branch: refs/heads/trunk
Commit: 0709c2cc1d2c3d78a2e40a9728db7aa08674d38f
Parents: 6348d11
Author: gtully <gary.tully@gmail.com>
Authored: Thu Jul 10 13:51:08 2014 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Thu Jul 10 13:51:08 2014 +0100

----------------------------------------------------------------------
 .../apache/activemq/broker/jmx/BrokerMBeanSupport.java  | 12 ++++++------
 .../apache/activemq/broker/XARecoveryBrokerTest.java    |  2 +-
 .../discovery/DiscoveryNetworkReconnectTest.java        |  4 ++++
 3 files changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/0709c2cc/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerMBeanSupport.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerMBeanSupport.java
b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerMBeanSupport.java
index 97a4f98..e7d888d 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerMBeanSupport.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerMBeanSupport.java
@@ -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;
     }

http://git-wip-us.apache.org/repos/asf/activemq/blob/0709c2cc/activemq-unit-tests/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
index 49fe817..2c41673 100755
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
@@ -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);

http://git-wip-us.apache.org/repos/asf/activemq/blob/0709c2cc/activemq-unit-tests/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java
index 79354b9..8601c34 100755
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java
@@ -119,6 +119,8 @@ public class DiscoveryNetworkReconnectTest {
             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(
                     new ObjectName("Test:type=Broker,brokerName=BrokerNC,destinationType=Topic,destinationName=ActiveMQ.Advisory.NetworkBridge"))));
@@ -155,6 +157,8 @@ public class DiscoveryNetworkReconnectTest {
             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(
                     new ObjectName("Test:type=Broker,brokerName=BrokerNC,destinationType=Topic,destinationName=ActiveMQ.Advisory.NetworkBridge"))));


Mime
View raw message