[jboss-cvs] JBossAS SVN: r58107 - in trunk/messaging: . src/etc/deploy src/main src/main/org src/main/org/jboss src/main/org/jboss/mq src/main/org/jboss/mq/server src/main/org/jboss/mq/server/jmx
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Nov 4 03:00:48 EST 2006
Author: scott.stark at jboss.org
Date: 2006-11-04 03:00:42 -0500 (Sat, 04 Nov 2006)
New Revision: 58107
Added:
trunk/messaging/src/etc/deploy/destinations-service.xml
trunk/messaging/src/etc/deploy/legacy-service.xml
trunk/messaging/src/main/org/
trunk/messaging/src/main/org/jboss/
trunk/messaging/src/main/org/jboss/mq/
trunk/messaging/src/main/org/jboss/mq/server/
trunk/messaging/src/main/org/jboss/mq/server/jmx/
trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgr.java
trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgrMBean.java
trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgr.java
trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgrMBean.java
trunk/messaging/src/main/org/jboss/mq/server/jmx/Queue.java
trunk/messaging/src/main/org/jboss/mq/server/jmx/QueueMBean.java
trunk/messaging/src/main/org/jboss/mq/server/jmx/Topic.java
trunk/messaging/src/main/org/jboss/mq/server/jmx/TopicMBean.java
Modified:
trunk/messaging/.classpath
trunk/messaging/build.xml
Log:
Update the messaging sar with legacy dest support
Modified: trunk/messaging/.classpath
===================================================================
--- trunk/messaging/.classpath 2006-11-04 08:00:00 UTC (rev 58106)
+++ trunk/messaging/.classpath 2006-11-04 08:00:42 UTC (rev 58107)
@@ -15,5 +15,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss/security/lib/jbosssx.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/security-spi/lib/jboss-security-spi.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/system-jmx"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/messaging/lib/jboss-messaging.jar" sourcepath="/home/svn/JBossMessaging/JBossMessaging_1_0_1_GA/src/main"/>
<classpathentry kind="output" path="output/eclipse-classes"/>
</classpath>
Modified: trunk/messaging/build.xml
===================================================================
--- trunk/messaging/build.xml 2006-11-04 08:00:00 UTC (rev 58106)
+++ trunk/messaging/build.xml 2006-11-04 08:00:42 UTC (rev 58107)
@@ -78,15 +78,16 @@
<path refid="jboss.j2ee.classpath"/>
<path refid="jboss.common.core.classpath"/>
<path refid="jboss.common.logging.spi.classpath"/>
- <path refid="jboss.common.logging.log4j.classpath"/>
- <path refid="jboss.common.logging.jdk.classpath"/>
+ <path refid="jboss.j2se.classpath"/>
+ <path refid="jboss.messaging.classpath"/>
+ <path refid="jboss.systemjmx.classpath"/>
</path>
<!-- ===== -->
<!-- Tasks -->
<!-- ===== -->
- <property name="jar.prefix" value="jboss-messaging"/>
+ <property name="jar.prefix" value="jboss-messaging-int"/>
<call target="_default:task-init"/>
</target>
Added: trunk/messaging/src/etc/deploy/destinations-service.xml
===================================================================
--- trunk/messaging/src/etc/deploy/destinations-service.xml 2006-11-04 08:00:00 UTC (rev 58106)
+++ trunk/messaging/src/etc/deploy/destinations-service.xml 2006-11-04 08:00:42 UTC (rev 58107)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Messaging Destinations deployment descriptor.
+
+ $Id: destinations-service.xml 927 2006-05-03 01:51:14Z ovidiu $
+-->
+
+<server>
+
+ <!--
+ The Dead Letter Queue. This destination is a dependency of an EJB MDB container.
+ -->
+
+ <mbean code="org.jboss.jms.server.destination.Queue"
+ name="jboss.messaging.destination:service=Queue,name=DLQ"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+
+</server>
Added: trunk/messaging/src/etc/deploy/legacy-service.xml
===================================================================
--- trunk/messaging/src/etc/deploy/legacy-service.xml 2006-11-04 08:00:00 UTC (rev 58106)
+++ trunk/messaging/src/etc/deploy/legacy-service.xml 2006-11-04 08:00:42 UTC (rev 58107)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Messaging Destinations deployment descriptor.
+
+ $Id: destinations-service.xml 927 2006-05-03 01:51:14Z ovidiu $
+-->
+
+<server>
+ <mbean code="org.jboss.mq.server.jmx.DummyDestMgr"
+ name="jboss.mq:service=DestinationManager">
+ <depends>jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.DummySecurityMgr"
+ name="jboss.mq:service=SecurityManager" />
+
+</server>
Added: trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgr.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgr.java 2006-11-04 08:00:00 UTC (rev 58106)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgr.java 2006-11-04 08:00:42 UTC (rev 58107)
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.mq.server.jmx;
+
+public class DummyDestMgr implements DummyDestMgrMBean
+{
+
+}
Added: trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgrMBean.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgrMBean.java 2006-11-04 08:00:00 UTC (rev 58106)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/DummyDestMgrMBean.java 2006-11-04 08:00:42 UTC (rev 58107)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.mq.server.jmx;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public interface DummyDestMgrMBean
+{
+
+}
Added: trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgr.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgr.java 2006-11-04 08:00:00 UTC (rev 58106)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgr.java 2006-11-04 08:00:42 UTC (rev 58107)
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.mq.server.jmx;
+
+public class DummySecurityMgr implements DummySecurityMgrMBean
+{
+
+}
Added: trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgrMBean.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgrMBean.java 2006-11-04 08:00:00 UTC (rev 58106)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/DummySecurityMgrMBean.java 2006-11-04 08:00:42 UTC (rev 58107)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.mq.server.jmx;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public interface DummySecurityMgrMBean
+{
+
+}
Added: trunk/messaging/src/main/org/jboss/mq/server/jmx/Queue.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/Queue.java 2006-11-04 08:00:00 UTC (rev 58106)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/Queue.java 2006-11-04 08:00:42 UTC (rev 58107)
@@ -0,0 +1,267 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.mq.server.jmx;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import javax.management.MBeanRegistration;
+import javax.management.MBeanServer;
+import javax.management.NotificationFilter;
+import javax.management.NotificationListener;
+import javax.management.ObjectName;
+
+import org.w3c.dom.Element;
+
+/**
+ * Portability class that maps the mbean ops onto the
+ * org.jboss.jms.server.destination.Queue
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class Queue
+ implements MBeanRegistration, QueueMBean
+{
+ private org.jboss.jms.server.destination.Queue delegate;
+
+ public Queue()
+ {
+ delegate = new org.jboss.jms.server.destination.Queue();
+ }
+ public Queue(boolean createProgramatically)
+ {
+ delegate = new org.jboss.jms.server.destination.Queue(createProgramatically);
+ }
+
+ public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
+ {
+ delegate.addNotificationListener(listener, filter, handback);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#create()
+ */
+ public void create() throws Exception
+ {
+ delegate.create();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#destroy()
+ */
+ public void destroy()
+ {
+ delegate.destroy();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#getDownCacheSize()
+ */
+ public int getDownCacheSize()
+ {
+ return delegate.getDownCacheSize();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#getFullSize()
+ */
+ public int getFullSize()
+ {
+ return delegate.getFullSize();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#getJNDIName()
+ */
+ public String getJNDIName()
+ {
+ return delegate.getJNDIName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#getMessageCount()
+ */
+ public int getMessageCount() throws Exception
+ {
+ return delegate.getMessageCount();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#getName()
+ */
+ public String getName()
+ {
+ return delegate.getName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#getPageSize()
+ */
+ public int getPageSize()
+ {
+ return delegate.getPageSize();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#getServerPeer()
+ */
+ public ObjectName getServerPeer()
+ {
+ return delegate.getServerPeer();
+ }
+
+ public ObjectName getServiceName()
+ {
+ return delegate.getServiceName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#isCreatedProgrammatically()
+ */
+ public boolean isCreatedProgrammatically()
+ {
+ return delegate.isCreatedProgrammatically();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#listMessages(java.lang.String)
+ */
+ public List listMessages(String arg0) throws Exception
+ {
+ return delegate.listMessages(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#removeAllMessages()
+ */
+ public void removeAllMessages() throws Exception
+ {
+ delegate.removeAllMessages();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#setDownCacheSize(int)
+ */
+ public void setDownCacheSize(int arg0)
+ {
+ delegate.setDownCacheSize(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#setFullSize(int)
+ */
+ public void setFullSize(int arg0)
+ {
+ delegate.setFullSize(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#setJNDIName(java.lang.String)
+ */
+ public void setJNDIName(String arg0)
+ {
+ delegate.setJNDIName(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#setPageSize(int)
+ */
+ public void setPageSize(int arg0)
+ {
+ delegate.setPageSize(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#setSecurityConfig(org.w3c.dom.Element)
+ */
+ public void setSecurityConfig(Element arg0) throws Exception
+ {
+ delegate.setSecurityConfig(arg0);
+ }
+ public void setSecurityConf(Element arg0) throws Exception
+ {
+ delegate.setSecurityConfig(arg0);
+ }
+
+ public void setSecurityManager(ObjectName arg0)
+ {
+ // noop
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#setServerPeer(javax.management.ObjectName)
+ */
+ public void setServerPeer(ObjectName arg0)
+ {
+ delegate.setServerPeer(arg0);
+ }
+ public void setDestinationManager(ObjectName arg0) throws Exception
+ {
+ ObjectName peer = new ObjectName("jboss.messaging:service=ServerPeer");
+ delegate.setServerPeer(peer);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#start()
+ */
+ public void start() throws Exception
+ {
+ delegate.start();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.QueueMBean#stop()
+ */
+ public void stop()
+ {
+ delegate.stop();
+ }
+
+ public void setMessageCounterHistoryDayLimit(int arg0)
+ {
+ // noop
+ }
+
+ public String toString()
+ {
+ return delegate.toString();
+ }
+
+ public void postDeregister()
+ {
+ delegate.postDeregister();
+ }
+ public void postRegister(Boolean registrationDone)
+ {
+ delegate.postRegister(registrationDone);
+ }
+ public void preDeregister() throws Exception
+ {
+ delegate.preDeregister();
+ }
+ public ObjectName preRegister(MBeanServer server, ObjectName name)
+ throws Exception
+ {
+ return delegate.preRegister(server, name);
+ }
+}
Added: trunk/messaging/src/main/org/jboss/mq/server/jmx/QueueMBean.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/QueueMBean.java 2006-11-04 08:00:00 UTC (rev 58106)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/QueueMBean.java 2006-11-04 08:00:42 UTC (rev 58107)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.mq.server.jmx;
+
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.w3c.dom.Element;
+
+public interface QueueMBean
+{
+
+ public void create() throws Exception;
+
+ public void destroy();
+
+ public int getDownCacheSize();
+
+ public int getFullSize();
+
+ public String getJNDIName();
+
+ public int getMessageCount() throws Exception;
+
+ public String getName();
+
+ public int getPageSize();
+
+ public ObjectName getServerPeer();
+
+ public boolean isCreatedProgrammatically();
+
+ public List listMessages(String arg0) throws Exception;
+
+ public void removeAllMessages() throws Exception;
+
+ public void setDownCacheSize(int arg0);
+
+ public void setFullSize(int arg0);
+
+ public void setJNDIName(String arg0);
+
+ public void setPageSize(int arg0);
+
+ public void setSecurityConfig(Element arg0) throws Exception;
+ public void setSecurityConf(Element arg0) throws Exception;
+ public void setSecurityManager(ObjectName arg0);
+
+ public void setServerPeer(ObjectName arg0);
+ public void setDestinationManager(ObjectName arg0) throws Exception;
+
+ public void setMessageCounterHistoryDayLimit(int arg0);
+
+ public void start() throws Exception;
+
+ public void stop();
+
+}
\ No newline at end of file
Added: trunk/messaging/src/main/org/jboss/mq/server/jmx/Topic.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/Topic.java 2006-11-04 08:00:00 UTC (rev 58106)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/Topic.java 2006-11-04 08:00:42 UTC (rev 58107)
@@ -0,0 +1,309 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.mq.server.jmx;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import javax.jms.InvalidSelectorException;
+import javax.management.MBeanRegistration;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.w3c.dom.Element;
+
+/**
+ * Portability class that maps the mbean ops onto the
+ * org.jboss.jms.server.destination.Topic
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class Topic
+ implements MBeanRegistration, TopicMBean
+{
+ private org.jboss.jms.server.destination.Topic delegate;
+
+ public Topic()
+ {
+ delegate = new org.jboss.jms.server.destination.Topic();
+ }
+ public Topic(boolean createProgramatically)
+ {
+ delegate = new org.jboss.jms.server.destination.Topic(createProgramatically);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#create()
+ */
+ public void create() throws Exception
+ {
+ delegate.create();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#destroy()
+ */
+ public void destroy()
+ {
+ delegate.destroy();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#getDownCacheSize()
+ */
+ public int getDownCacheSize()
+ {
+ return delegate.getDownCacheSize();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#getFullSize()
+ */
+ public int getFullSize()
+ {
+ return delegate.getFullSize();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#getJNDIName()
+ */
+ public String getJNDIName()
+ {
+ return delegate.getJNDIName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#getMessagesFromNonDurableSub(org.jboss.messaging.core.local.Topic, long, java.lang.String)
+ */
+ public List getMessagesFromNonDurableSub(org.jboss.messaging.core.local.Topic arg0,
+ long arg1, String arg2) throws InvalidSelectorException
+ {
+ return delegate.getMessagesFromNonDurableSub(arg0, arg1, arg2);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#getName()
+ */
+ public String getName()
+ {
+ return delegate.getName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#getPageSize()
+ */
+ public int getPageSize()
+ {
+ return delegate.getPageSize();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#getServer()
+ */
+ public MBeanServer getServer()
+ {
+ return delegate.getServer();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#getServerPeer()
+ */
+ public ObjectName getServerPeer()
+ {
+ return delegate.getServerPeer();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#isCreatedProgrammatically()
+ */
+ public boolean isCreatedProgrammatically()
+ {
+ return delegate.isCreatedProgrammatically();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#listMessagesDurableSub(java.lang.String, java.lang.String, java.lang.String)
+ */
+ public List listMessagesDurableSub(String arg0, String arg1, String arg2) throws Exception
+ {
+ return delegate.listMessagesDurableSub(arg0, arg1, arg2);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#listMessagesNonDurableSub(long, java.lang.String)
+ */
+ public List listMessagesNonDurableSub(long arg0, String arg1) throws Exception
+ {
+ return delegate.listMessagesNonDurableSub(arg0, arg1);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#listSubscriptionsAsText()
+ */
+ public String listSubscriptionsAsText() throws Exception
+ {
+ return delegate.listSubscriptionsAsText();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#listSubscriptionsAsText(boolean)
+ */
+ public String listSubscriptionsAsText(boolean arg0) throws Exception
+ {
+ return delegate.listSubscriptionsAsText(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#removeAllMessages()
+ */
+ public void removeAllMessages() throws Exception
+ {
+ delegate.removeAllMessages();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setDownCacheSize(int)
+ */
+ public void setDownCacheSize(int arg0)
+ {
+ delegate.setDownCacheSize(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setFullSize(int)
+ */
+ public void setFullSize(int arg0)
+ {
+ delegate.setFullSize(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setJNDIName(java.lang.String)
+ */
+ public void setJNDIName(String arg0)
+ {
+ delegate.setJNDIName(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setPageSize(int)
+ */
+ public void setPageSize(int arg0)
+ {
+ delegate.setPageSize(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setSecurityConfig(org.w3c.dom.Element)
+ */
+ public void setSecurityConfig(Element arg0) throws Exception
+ {
+ delegate.setSecurityConfig(arg0);
+ }
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setSecurityConf(org.w3c.dom.Element)
+ */
+ public void setSecurityConf(Element arg0) throws Exception
+ {
+ delegate.setSecurityConfig(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setSecurityManager(javax.management.ObjectName)
+ */
+ public void setSecurityManager(ObjectName arg0)
+ {
+ // noop
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setServerPeer(javax.management.ObjectName)
+ */
+ public void setServerPeer(ObjectName arg0)
+ {
+ delegate.setServerPeer(arg0);
+ }
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#setDestinationManager(javax.management.ObjectName)
+ */
+ public void setDestinationManager(ObjectName arg0) throws Exception
+ {
+ ObjectName peer = new ObjectName("jboss.messaging:service=ServerPeer");
+ delegate.setServerPeer(peer);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#start()
+ */
+ public void start() throws Exception
+ {
+ delegate.start();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#stop()
+ */
+ public void stop()
+ {
+ delegate.stop();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#subscriptionCount()
+ */
+ public int subscriptionCount() throws Exception
+ {
+ return delegate.subscriptionCount();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.mq.server.jmx.TopicMBean#subscriptionCount(boolean)
+ */
+ public int subscriptionCount(boolean arg0) throws Exception
+ {
+ return delegate.subscriptionCount(arg0);
+ }
+
+ public String toString()
+ {
+ return delegate.toString();
+ }
+
+ public void postDeregister()
+ {
+ delegate.postDeregister();
+ }
+ public void postRegister(Boolean registrationDone)
+ {
+ delegate.postRegister(registrationDone);
+ }
+ public void preDeregister() throws Exception
+ {
+ delegate.preDeregister();
+ }
+ public ObjectName preRegister(MBeanServer server, ObjectName name)
+ throws Exception
+ {
+ return delegate.preRegister(server, name);
+ }
+}
Added: trunk/messaging/src/main/org/jboss/mq/server/jmx/TopicMBean.java
===================================================================
--- trunk/messaging/src/main/org/jboss/mq/server/jmx/TopicMBean.java 2006-11-04 08:00:00 UTC (rev 58106)
+++ trunk/messaging/src/main/org/jboss/mq/server/jmx/TopicMBean.java 2006-11-04 08:00:42 UTC (rev 58107)
@@ -0,0 +1,77 @@
+package org.jboss.mq.server.jmx;
+
+import java.util.List;
+
+import javax.jms.InvalidSelectorException;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.w3c.dom.Element;
+
+public interface TopicMBean
+{
+
+ public abstract void create() throws Exception;
+
+ public abstract void destroy();
+
+ public abstract int getDownCacheSize();
+
+ public abstract int getFullSize();
+
+ public abstract String getJNDIName();
+
+ public abstract List getMessagesFromNonDurableSub(
+ org.jboss.messaging.core.local.Topic arg0, long arg1, String arg2)
+ throws InvalidSelectorException;
+
+ public abstract String getName();
+
+ public abstract int getPageSize();
+
+ public abstract MBeanServer getServer();
+
+ public abstract ObjectName getServerPeer();
+
+ public abstract boolean isCreatedProgrammatically();
+
+ public abstract List listMessagesDurableSub(String arg0, String arg1,
+ String arg2) throws Exception;
+
+ public abstract List listMessagesNonDurableSub(long arg0, String arg1)
+ throws Exception;
+
+ public abstract String listSubscriptionsAsText() throws Exception;
+
+ public abstract String listSubscriptionsAsText(boolean arg0)
+ throws Exception;
+
+ public abstract void removeAllMessages() throws Exception;
+
+ public abstract void setDownCacheSize(int arg0);
+
+ public abstract void setFullSize(int arg0);
+
+ public abstract void setJNDIName(String arg0);
+
+ public abstract void setPageSize(int arg0);
+
+ public abstract void setSecurityConfig(Element arg0) throws Exception;
+
+ public abstract void setSecurityConf(Element arg0) throws Exception;
+
+ public abstract void setSecurityManager(ObjectName arg0);
+
+ public abstract void setServerPeer(ObjectName arg0);
+
+ public abstract void setDestinationManager(ObjectName arg0) throws Exception;
+
+ public abstract void start() throws Exception;
+
+ public abstract void stop();
+
+ public abstract int subscriptionCount() throws Exception;
+
+ public abstract int subscriptionCount(boolean arg0) throws Exception;
+
+}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list