[jboss-cvs] JBoss Messaging SVN: r4770 - in branches/Branch_JBMESSAGING-1303: src/main/org/jboss/messaging/jms/server/management and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Aug 5 04:40:55 EDT 2008
Author: jmesnil
Date: 2008-08-05 04:40:55 -0400 (Tue, 05 Aug 2008)
New Revision: 4770
Added:
branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/JMSManagementService.java
branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementServiceImpl.java
Removed:
branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/JMSManagementRegistration.java
branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementRegistrationImpl.java
Modified:
branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java
branches/Branch_JBMESSAGING-1303/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java
branches/Branch_JBMESSAGING-1303/tests/jms-tests/src/org/jboss/test/messaging/tools/container/RMITestServer.java
branches/Branch_JBMESSAGING-1303/tests/src/org/jboss/messaging/tests/integration/jms/server/impl/JMSServerManagerimplTest.java
branches/Branch_JBMESSAGING-1303/tests/src/org/jboss/messaging/tests/unit/jms/server/management/impl/JMSServerControlTest.java
Log:
JBMESSAGING-1303: Revisit management interfaces
* renamed JMSManagementRegistration to JMSManagementService
* inject it into JMSServerManager using JBoss microcontainer
Modified: branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java
===================================================================
--- branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java 2008-08-05 08:37:17 UTC (rev 4769)
+++ branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java 2008-08-05 08:40:55 UTC (rev 4770)
@@ -42,8 +42,8 @@
import org.jboss.messaging.jms.JBossTopic;
import org.jboss.messaging.jms.client.JBossConnectionFactory;
import org.jboss.messaging.jms.server.JMSServerManager;
-import org.jboss.messaging.jms.server.management.JMSManagementRegistration;
-import org.jboss.messaging.jms.server.management.impl.JMSManagementRegistrationImpl;
+import org.jboss.messaging.jms.server.management.JMSManagementService;
+import org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl;
import org.jboss.messaging.util.JNDIUtil;
/**
@@ -71,13 +71,12 @@
private final MessagingServerManagement messagingServerManagement;
- private JMSManagementRegistration managementRegistration;
+ private JMSManagementService managementService;
- public JMSServerManagerImpl(final MessagingServerManagement serverManager)
+ public JMSServerManagerImpl(final MessagingServerManagement serverManager, final JMSManagementService managementService)
{
messagingServerManagement = serverManager;
- managementRegistration = new JMSManagementRegistrationImpl(
- ManagementFactory.getPlatformMBeanServer());
+ this.managementService = managementService;
}
public void start() throws Exception
@@ -89,7 +88,7 @@
{
log.error("Unable to create Initial Context", e);
}
- managementRegistration.registerJMSServer(this);
+ managementService.registerJMSServer(this);
}
// JMSServerManager implementation -------------------------------
@@ -116,7 +115,7 @@
{
addToDestinationBindings(queueName, jndiBinding);
}
- managementRegistration.registerQueue(jBossQueue,
+ managementService.registerQueue(jBossQueue,
messagingServerManagement.getQueue(jBossQueue.getSimpleAddress()),
jndiBinding, this);
return added;
@@ -132,7 +131,7 @@
{
addToDestinationBindings(topicName, jndiBinding);
}
- managementRegistration.registerTopic(jBossTopic,
+ managementService.registerTopic(jBossTopic,
messagingServerManagement, jndiBinding);
return added;
}
@@ -149,7 +148,7 @@
initialContext.unbind(jndiBinding);
}
destinations.remove(name);
- managementRegistration.unregisterQueue(name);
+ managementService.unregisterQueue(name);
messagingServerManagement.removeDestination(JBossQueue
.createAddressFromName(name));
messagingServerManagement.destroyQueue(JBossQueue
@@ -170,7 +169,7 @@
initialContext.unbind(jndiBinding);
}
destinations.remove(name);
- managementRegistration.unregisterTopic(name);
+ managementService.unregisterTopic(name);
messagingServerManagement.removeDestination(JBossTopic
.createAddressFromName(name));
@@ -217,7 +216,7 @@
List<String> bindings = new ArrayList<String>();
bindings.add(jndiBinding);
- managementRegistration.registerConnectionFactory(name, cf, bindings);
+ managementService.registerConnectionFactory(name, cf, bindings);
return true;
}
@@ -251,7 +250,7 @@
connectionFactoryBindings.get(name).add(jndiBinding);
}
- managementRegistration.registerConnectionFactory(name, cf, jndiBindings);
+ managementService.registerConnectionFactory(name, cf, jndiBindings);
return true;
}
@@ -270,7 +269,7 @@
connectionFactoryBindings.remove(name);
connectionFactories.remove(name);
- managementRegistration.unregisterConnectionFactory(name);
+ managementService.unregisterConnectionFactory(name);
return true;
}
Deleted: branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/JMSManagementRegistration.java
===================================================================
--- branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/JMSManagementRegistration.java 2008-08-05 08:37:17 UTC (rev 4769)
+++ branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/JMSManagementRegistration.java 2008-08-05 08:40:55 UTC (rev 4770)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.messaging.jms.server.management;
-
-import java.util.List;
-
-import org.jboss.messaging.core.management.MessagingServerManagement;
-import org.jboss.messaging.core.server.Queue;
-import org.jboss.messaging.jms.JBossQueue;
-import org.jboss.messaging.jms.JBossTopic;
-import org.jboss.messaging.jms.client.JBossConnectionFactory;
-import org.jboss.messaging.jms.server.JMSServerManager;
-
-/**
- * @author <a href="mailto:jmesnil at redhat.com">Jeff Mesnil</a>
- *
- * @version <tt>$Revision$</tt>
- *
- */
-public interface JMSManagementRegistration
-{
- void registerJMSServer(JMSServerManager server) throws Exception;
-
- void unregisterJMSServer();
-
- void registerQueue(JBossQueue queue, Queue coreQueue, String jndiBinding, JMSServerManager server) throws Exception;
-
- void unregisterQueue(String name) throws Exception;
-
- void registerTopic(JBossTopic topic, MessagingServerManagement serverManagement, String jndiBinding) throws Exception;
-
- void unregisterTopic(String name) throws Exception;
-
- void registerConnectionFactory(String name, JBossConnectionFactory connectionFactory, List<String> bindings) throws Exception;
-
- void unregisterConnectionFactory(String name) throws Exception;
-}
Copied: branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/JMSManagementService.java (from rev 4765, branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/JMSManagementRegistration.java)
===================================================================
--- branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/JMSManagementService.java (rev 0)
+++ branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/JMSManagementService.java 2008-08-05 08:40:55 UTC (rev 4770)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.messaging.jms.server.management;
+
+import java.util.List;
+
+import org.jboss.messaging.core.management.MessagingServerManagement;
+import org.jboss.messaging.core.server.Queue;
+import org.jboss.messaging.jms.JBossQueue;
+import org.jboss.messaging.jms.JBossTopic;
+import org.jboss.messaging.jms.client.JBossConnectionFactory;
+import org.jboss.messaging.jms.server.JMSServerManager;
+
+/**
+ * @author <a href="mailto:jmesnil at redhat.com">Jeff Mesnil</a>
+ *
+ * @version <tt>$Revision$</tt>
+ *
+ */
+public interface JMSManagementService
+{
+ void registerJMSServer(JMSServerManager server) throws Exception;
+
+ void unregisterJMSServer();
+
+ void registerQueue(JBossQueue queue, Queue coreQueue, String jndiBinding, JMSServerManager server) throws Exception;
+
+ void unregisterQueue(String name) throws Exception;
+
+ void registerTopic(JBossTopic topic, MessagingServerManagement serverManagement, String jndiBinding) throws Exception;
+
+ void unregisterTopic(String name) throws Exception;
+
+ void registerConnectionFactory(String name, JBossConnectionFactory connectionFactory, List<String> bindings) throws Exception;
+
+ void unregisterConnectionFactory(String name) throws Exception;
+}
Property changes on: branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/JMSManagementService.java
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementRegistrationImpl.java
===================================================================
--- branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementRegistrationImpl.java 2008-08-05 08:37:17 UTC (rev 4769)
+++ branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementRegistrationImpl.java 2008-08-05 08:40:55 UTC (rev 4770)
@@ -1,169 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.messaging.jms.server.management.impl;
-
-import java.util.List;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.jboss.messaging.core.management.MessagingServerManagement;
-import org.jboss.messaging.core.management.impl.ManagementServiceImpl;
-import org.jboss.messaging.core.server.Queue;
-import org.jboss.messaging.jms.JBossQueue;
-import org.jboss.messaging.jms.JBossTopic;
-import org.jboss.messaging.jms.client.JBossConnectionFactory;
-import org.jboss.messaging.jms.server.JMSServerManager;
-import org.jboss.messaging.jms.server.management.JMSManagementRegistration;
-
-/**
- * @author <a href="mailto:jmesnil at redhat.com">Jeff Mesnil</a>
- *
- * @version <tt>$Revision$</tt>
- *
- */
-public class JMSManagementRegistrationImpl implements JMSManagementRegistration
-{
-
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- public MBeanServer mbeanServer;
-
- // Static --------------------------------------------------------
-
- public static ObjectName getJMSServerObjectName() throws Exception
- {
- return ObjectName.getInstance(ManagementServiceImpl.DOMAIN
- + ":module=JMS,type=Server");
- }
-
- public static ObjectName getJMSQueueObjectName(final String name)
- throws Exception
- {
- return ObjectName.getInstance(ManagementServiceImpl.DOMAIN
- + ":module=JMS,type=Queue,name=" + name.toString());
- }
-
- public static ObjectName getJMSTopicObjectName(final String name)
- throws Exception
- {
- return ObjectName.getInstance(ManagementServiceImpl.DOMAIN
- + ":module=JMS,type=Topic,name=" + name.toString());
- }
-
- private ObjectName getConnectionFactoryObjectName(final String name)
- throws Exception
- {
- return ObjectName.getInstance(ManagementServiceImpl.DOMAIN
- + ":module=JMS,type=ConnectionFactory,name=" + name);
- }
-
- // Constructors --------------------------------------------------
-
- public JMSManagementRegistrationImpl(final MBeanServer mbeanServer)
- {
- this.mbeanServer = mbeanServer;
- }
-
- // Public --------------------------------------------------------
-
- // JMSManagementRegistration implementation ----------------------
-
- public void registerJMSServer(final JMSServerManager server)
- throws Exception
- {
- ObjectName objectName = getJMSServerObjectName();
- if (mbeanServer.isRegistered(objectName))
- {
- mbeanServer.unregisterMBean(objectName);
- }
- mbeanServer.registerMBean(new JMSServerControl(server), objectName);
- }
-
- public void unregisterJMSServer()
- {
- // TODO Auto-generated method stub
-
- }
-
- public void registerQueue(final JBossQueue queue, final Queue coreQueue,
- final String jndiBinding, final JMSServerManager server)
- throws Exception
- {
- ObjectName objectName = getJMSQueueObjectName(queue.getQueueName());
- if (mbeanServer.isRegistered(objectName))
- {
- mbeanServer.unregisterMBean(objectName);
- }
- mbeanServer.registerMBean(new JMSQueueControl(queue, coreQueue,
- jndiBinding, server), getJMSQueueObjectName(queue.getQueueName()));
- }
-
- public void unregisterQueue(final String name) throws Exception
- {
- mbeanServer.unregisterMBean(getJMSQueueObjectName(name));
- }
-
- public void registerTopic(final JBossTopic topic,
- final MessagingServerManagement serverManagement,
- final String jndiBinding) throws Exception
- {
- ObjectName objectName = getJMSTopicObjectName(topic.getTopicName());
- if (mbeanServer.isRegistered(objectName))
- {
- mbeanServer.unregisterMBean(objectName);
- }
- mbeanServer.registerMBean(new TopicControl(topic, serverManagement,
- jndiBinding), objectName);
- }
-
- public void unregisterTopic(final String name) throws Exception
- {
- mbeanServer.unregisterMBean(getJMSTopicObjectName(name));
- }
-
- public void registerConnectionFactory(final String name,
- final JBossConnectionFactory connectionFactory,
- final List<String> bindings) throws Exception
- {
- ObjectName objectName = getConnectionFactoryObjectName(name);
- mbeanServer.registerMBean(new ConnectionFactoryControl(connectionFactory,
- connectionFactory.getCoreConnection(), name, bindings), objectName);
- }
-
- public void unregisterConnectionFactory(final String name) throws Exception
- {
- ObjectName objectName = getConnectionFactoryObjectName(name);
- mbeanServer.unregisterMBean(objectName);
- }
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
Copied: branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementServiceImpl.java (from rev 4765, branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementRegistrationImpl.java)
===================================================================
--- branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementServiceImpl.java (rev 0)
+++ branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementServiceImpl.java 2008-08-05 08:40:55 UTC (rev 4770)
@@ -0,0 +1,169 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.messaging.jms.server.management.impl;
+
+import java.util.List;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.messaging.core.management.MessagingServerManagement;
+import org.jboss.messaging.core.management.impl.ManagementServiceImpl;
+import org.jboss.messaging.core.server.Queue;
+import org.jboss.messaging.jms.JBossQueue;
+import org.jboss.messaging.jms.JBossTopic;
+import org.jboss.messaging.jms.client.JBossConnectionFactory;
+import org.jboss.messaging.jms.server.JMSServerManager;
+import org.jboss.messaging.jms.server.management.JMSManagementService;
+
+/**
+ * @author <a href="mailto:jmesnil at redhat.com">Jeff Mesnil</a>
+ *
+ * @version <tt>$Revision$</tt>
+ *
+ */
+public class JMSManagementServiceImpl implements JMSManagementService
+{
+
+ // Constants -----------------------------------------------------
+
+ // Attributes ----------------------------------------------------
+
+ public MBeanServer mbeanServer;
+
+ // Static --------------------------------------------------------
+
+ public static ObjectName getJMSServerObjectName() throws Exception
+ {
+ return ObjectName.getInstance(ManagementServiceImpl.DOMAIN
+ + ":module=JMS,type=Server");
+ }
+
+ public static ObjectName getJMSQueueObjectName(final String name)
+ throws Exception
+ {
+ return ObjectName.getInstance(ManagementServiceImpl.DOMAIN
+ + ":module=JMS,type=Queue,name=" + name.toString());
+ }
+
+ public static ObjectName getJMSTopicObjectName(final String name)
+ throws Exception
+ {
+ return ObjectName.getInstance(ManagementServiceImpl.DOMAIN
+ + ":module=JMS,type=Topic,name=" + name.toString());
+ }
+
+ private ObjectName getConnectionFactoryObjectName(final String name)
+ throws Exception
+ {
+ return ObjectName.getInstance(ManagementServiceImpl.DOMAIN
+ + ":module=JMS,type=ConnectionFactory,name=" + name);
+ }
+
+ // Constructors --------------------------------------------------
+
+ public JMSManagementServiceImpl(final MBeanServer mbeanServer)
+ {
+ this.mbeanServer = mbeanServer;
+ }
+
+ // Public --------------------------------------------------------
+
+ // JMSManagementRegistration implementation ----------------------
+
+ public void registerJMSServer(final JMSServerManager server)
+ throws Exception
+ {
+ ObjectName objectName = getJMSServerObjectName();
+ if (mbeanServer.isRegistered(objectName))
+ {
+ mbeanServer.unregisterMBean(objectName);
+ }
+ mbeanServer.registerMBean(new JMSServerControl(server), objectName);
+ }
+
+ public void unregisterJMSServer()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void registerQueue(final JBossQueue queue, final Queue coreQueue,
+ final String jndiBinding, final JMSServerManager server)
+ throws Exception
+ {
+ ObjectName objectName = getJMSQueueObjectName(queue.getQueueName());
+ if (mbeanServer.isRegistered(objectName))
+ {
+ mbeanServer.unregisterMBean(objectName);
+ }
+ mbeanServer.registerMBean(new JMSQueueControl(queue, coreQueue,
+ jndiBinding, server), getJMSQueueObjectName(queue.getQueueName()));
+ }
+
+ public void unregisterQueue(final String name) throws Exception
+ {
+ mbeanServer.unregisterMBean(getJMSQueueObjectName(name));
+ }
+
+ public void registerTopic(final JBossTopic topic,
+ final MessagingServerManagement serverManagement,
+ final String jndiBinding) throws Exception
+ {
+ ObjectName objectName = getJMSTopicObjectName(topic.getTopicName());
+ if (mbeanServer.isRegistered(objectName))
+ {
+ mbeanServer.unregisterMBean(objectName);
+ }
+ mbeanServer.registerMBean(new TopicControl(topic, serverManagement,
+ jndiBinding), objectName);
+ }
+
+ public void unregisterTopic(final String name) throws Exception
+ {
+ mbeanServer.unregisterMBean(getJMSTopicObjectName(name));
+ }
+
+ public void registerConnectionFactory(final String name,
+ final JBossConnectionFactory connectionFactory,
+ final List<String> bindings) throws Exception
+ {
+ ObjectName objectName = getConnectionFactoryObjectName(name);
+ mbeanServer.registerMBean(new ConnectionFactoryControl(connectionFactory,
+ connectionFactory.getCoreConnection(), name, bindings), objectName);
+ }
+
+ public void unregisterConnectionFactory(final String name) throws Exception
+ {
+ ObjectName objectName = getConnectionFactoryObjectName(name);
+ mbeanServer.unregisterMBean(objectName);
+ }
+
+ // Package protected ---------------------------------------------
+
+ // Protected -----------------------------------------------------
+
+ // Private -------------------------------------------------------
+
+ // Inner classes -------------------------------------------------
+}
Property changes on: branches/Branch_JBMESSAGING-1303/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementServiceImpl.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: branches/Branch_JBMESSAGING-1303/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java
===================================================================
--- branches/Branch_JBMESSAGING-1303/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java 2008-08-05 08:37:17 UTC (rev 4769)
+++ branches/Branch_JBMESSAGING-1303/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java 2008-08-05 08:40:55 UTC (rev 4770)
@@ -51,7 +51,7 @@
import org.jboss.messaging.jms.server.management.JMSQueueControlMBean;
import org.jboss.messaging.jms.server.management.SubscriberInfo;
import org.jboss.messaging.jms.server.management.TopicControlMBean;
-import org.jboss.messaging.jms.server.management.impl.JMSManagementRegistrationImpl;
+import org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl;
import org.jboss.messaging.microcontainer.JBMBootstrapServer;
import org.jboss.messaging.util.SimpleString;
import org.jboss.test.messaging.tools.ConfigurationHelper;
@@ -638,7 +638,7 @@
public Integer getMessageCountForQueue(String queueName) throws Exception
{
- ObjectName objectName = JMSManagementRegistrationImpl.getJMSQueueObjectName(queueName);
+ ObjectName objectName = JMSManagementServiceImpl.getJMSQueueObjectName(queueName);
JMSQueueControlMBean queue = (JMSQueueControlMBean) MBeanServerInvocationHandler.newProxyInstance(
ManagementFactory.getPlatformMBeanServer(), objectName, JMSQueueControlMBean.class, false);
return queue.getMessageCount();
@@ -651,7 +651,7 @@
public List<SubscriberInfo> listAllSubscribersForTopic(String s) throws Exception
{
- ObjectName objectName = JMSManagementRegistrationImpl.getJMSTopicObjectName(s);
+ ObjectName objectName = JMSManagementServiceImpl.getJMSTopicObjectName(s);
TopicControlMBean topic = (TopicControlMBean) MBeanServerInvocationHandler.newProxyInstance(
ManagementFactory.getPlatformMBeanServer(), objectName, TopicControlMBean.class, false);
return Arrays.asList(topic.listAllSubscriberInfos());
Modified: branches/Branch_JBMESSAGING-1303/tests/jms-tests/src/org/jboss/test/messaging/tools/container/RMITestServer.java
===================================================================
--- branches/Branch_JBMESSAGING-1303/tests/jms-tests/src/org/jboss/test/messaging/tools/container/RMITestServer.java 2008-08-05 08:37:17 UTC (rev 4769)
+++ branches/Branch_JBMESSAGING-1303/tests/jms-tests/src/org/jboss/test/messaging/tools/container/RMITestServer.java 2008-08-05 08:40:55 UTC (rev 4770)
@@ -48,7 +48,7 @@
import org.jboss.messaging.jms.server.management.JMSQueueControlMBean;
import org.jboss.messaging.jms.server.management.SubscriberInfo;
import org.jboss.messaging.jms.server.management.TopicControlMBean;
-import org.jboss.messaging.jms.server.management.impl.JMSManagementRegistrationImpl;
+import org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl;
/**
* An RMI wrapper to access the ServiceContainer from a different address space.
@@ -465,7 +465,7 @@
public Integer getMessageCountForQueue(String queueName) throws Exception
{
- ObjectName objectName = JMSManagementRegistrationImpl.getJMSQueueObjectName(queueName);
+ ObjectName objectName = JMSManagementServiceImpl.getJMSQueueObjectName(queueName);
JMSQueueControlMBean queue = (JMSQueueControlMBean) MBeanServerInvocationHandler.newProxyInstance(
ManagementFactory.getPlatformMBeanServer(), objectName, JMSQueueControlMBean.class, false);
return queue.getMessageCount();
@@ -474,7 +474,7 @@
public List<SubscriberInfo> listAllSubscribersForTopic(String s) throws Exception
{
- ObjectName objectName = JMSManagementRegistrationImpl.getJMSTopicObjectName(s);
+ ObjectName objectName = JMSManagementServiceImpl.getJMSTopicObjectName(s);
TopicControlMBean topic = (TopicControlMBean) MBeanServerInvocationHandler.newProxyInstance(
ManagementFactory.getPlatformMBeanServer(), objectName, TopicControlMBean.class, false);
return Arrays.asList(topic.listAllSubscriberInfos());
Modified: branches/Branch_JBMESSAGING-1303/tests/src/org/jboss/messaging/tests/integration/jms/server/impl/JMSServerManagerimplTest.java
===================================================================
--- branches/Branch_JBMESSAGING-1303/tests/src/org/jboss/messaging/tests/integration/jms/server/impl/JMSServerManagerimplTest.java 2008-08-05 08:37:17 UTC (rev 4769)
+++ branches/Branch_JBMESSAGING-1303/tests/src/org/jboss/messaging/tests/integration/jms/server/impl/JMSServerManagerimplTest.java 2008-08-05 08:40:55 UTC (rev 4770)
@@ -24,6 +24,7 @@
import static org.jboss.messaging.core.remoting.TransportType.INVM;
+import java.lang.management.ManagementFactory;
import java.util.ArrayList;
import java.util.Hashtable;
@@ -39,6 +40,7 @@
import org.jboss.messaging.core.server.impl.MessagingServiceImpl;
import org.jboss.messaging.jms.client.JBossConnectionFactory;
import org.jboss.messaging.jms.server.impl.JMSServerManagerImpl;
+import org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl;
/**
* JMSServerManagerImpl tests
@@ -58,7 +60,9 @@
conf.setTransport(INVM);
messagingService = MessagingServiceImpl.newNullStorageMessagingServer(conf);
messagingService.start();
- jmsServerManager = new JMSServerManagerImpl(messagingService.getServer().getServerManagement());
+ jmsServerManager = new JMSServerManagerImpl(messagingService.getServer()
+ .getServerManagement(), new JMSManagementServiceImpl(
+ ManagementFactory.getPlatformMBeanServer()));
Hashtable env = new Hashtable();
env.put("java.naming.factory.initial",
"org.jboss.messaging.tests.util.InVMSingleInitialContextFactory");
Modified: branches/Branch_JBMESSAGING-1303/tests/src/org/jboss/messaging/tests/unit/jms/server/management/impl/JMSServerControlTest.java
===================================================================
--- branches/Branch_JBMESSAGING-1303/tests/src/org/jboss/messaging/tests/unit/jms/server/management/impl/JMSServerControlTest.java 2008-08-05 08:37:17 UTC (rev 4769)
+++ branches/Branch_JBMESSAGING-1303/tests/src/org/jboss/messaging/tests/unit/jms/server/management/impl/JMSServerControlTest.java 2008-08-05 08:40:55 UTC (rev 4770)
@@ -45,7 +45,7 @@
import junit.framework.TestCase;
import org.jboss.messaging.jms.server.JMSServerManager;
-import org.jboss.messaging.jms.server.management.impl.JMSManagementRegistrationImpl;
+import org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl;
import org.jboss.messaging.jms.server.management.impl.JMSServerControl;
/**
@@ -361,7 +361,7 @@
super.setUp();
mbeanServer = ManagementFactory.getPlatformMBeanServer();
- serverON = JMSManagementRegistrationImpl.getJMSServerObjectName();
+ serverON = JMSManagementServiceImpl.getJMSServerObjectName();
}
@Override
More information about the jboss-cvs-commits
mailing list