summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2006-12-18 11:34:06 +0000
committerMartin Ritchie <ritchiem@apache.org>2006-12-18 11:34:06 +0000
commit1c83d0defb47c7f9503ba8341e039876b7871879 (patch)
tree825f490c8e23614aaa6da2131b210ca2831d4e38
parent8d55600e9db5cb7385848f013d1c8de43f2fa9df (diff)
downloadqpid-python-1c83d0defb47c7f9503ba8341e039876b7871879.tar.gz
Trunk Merges
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/jmsselectors@488232 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/NOTICE.txt4
-rw-r--r--java/distribution/pom.xml15
-rw-r--r--java/distribution/src/main/assembly/bin.xml33
-rw-r--r--java/distribution/src/main/assembly/client-bin.xml19
-rw-r--r--java/distribution/src/main/assembly/management-eclipse-plugin-unix.xml112
-rw-r--r--java/distribution/src/main/assembly/management-eclipse-plugin.xml142
-rw-r--r--java/distribution/src/main/assembly/src.xml57
-rw-r--r--java/management/eclipse-plugin/META-INF/MANIFEST.MF1
-rw-r--r--java/management/eclipse-plugin/README.txt2
-rw-r--r--java/management/eclipse-plugin/bin/qpidmc.bat2
-rwxr-xr-xjava/management/eclipse-plugin/bin/qpidmc.sh20
-rw-r--r--java/management/eclipse-plugin/build.properties8
-rw-r--r--java/management/eclipse-plugin/build.xml215
-rw-r--r--java/management/eclipse-plugin/icons/qpidmc16.gifbin0 -> 928 bytes
-rw-r--r--java/management/eclipse-plugin/icons/splash.bmp (renamed from java/management/eclipse-plugin/splash.bmp)bin207078 -> 207078 bytes
-rw-r--r--java/management/eclipse-plugin/plugin.xml2
-rw-r--r--java/management/eclipse-plugin/pom.xml216
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Activator.java12
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Application.java4
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java4
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationWorkbenchWindowAdvisor.java6
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java5
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedBean.java5
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedObject.java4
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedServer.java4
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Perspective.java21
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/exceptions/ManagementConsoleException.java10
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java181
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java41
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java9
-rw-r--r--java/management/eclipse-plugin/src/main/resources/.eclipseproduct5
-rw-r--r--java/management/eclipse-plugin/src/main/resources/eclipse.exebin0 -> 180224 bytes
-rw-r--r--java/management/eclipse-plugin/src/main/resources/eclipse.ini4
-rw-r--r--java/management/eclipse-plugin/src/main/resources/license.eclipse.txt88
-rw-r--r--java/management/eclipse-plugin/src/main/resources/startup.jar (renamed from java/management/eclipse-plugin/startup.jar)bin33049 -> 33049 bytes
-rw-r--r--java/management/eclipse-plugin/src/main/resources/unix/configuration/config.ini26
-rw-r--r--java/management/eclipse-plugin/src/main/resources/win32/configuration/config.ini (renamed from java/management/eclipse-plugin/configuration/config.ini)1
-rw-r--r--java/management/eclipse-plugin/src/main/resources/win32/configuration/org.eclipse.osgi/bundles/16/1/.cp/swt-win32-3232.dll (renamed from java/management/eclipse-plugin/configuration/org.eclipse.osgi/bundles/16/1/.cp/swt-win32-3232.dll)bin323584 -> 323584 bytes
-rw-r--r--java/pom.xml154
-rw-r--r--java/systests/pom.xml10
-rw-r--r--java/systests/src/old_test/java/org/apache/qpid/server/exchange/HeadersExchangePerformanceTest.java (renamed from java/systests/src/test/java/org/apache/qpid/server/exchange/HeadersExchangePerformanceTest.java)0
-rw-r--r--java/systests/src/old_test/java/org/apache/qpid/server/protocol/TestProtocolInitiation.java (renamed from java/systests/src/test/java/org/apache/qpid/server/protocol/TestProtocolInitiation.java)0
-rw-r--r--java/systests/src/old_test/java/org/apache/qpid/server/queue/QueueConcurrentPerfTest.java (renamed from java/systests/src/test/java/org/apache/qpid/server/queue/QueueConcurrentPerfTest.java)0
-rw-r--r--java/systests/src/old_test/java/org/apache/qpid/server/queue/QueuePerfTest.java (renamed from java/systests/src/test/java/org/apache/qpid/server/queue/QueuePerfTest.java)0
-rw-r--r--java/systests/src/old_test/java/org/apache/qpid/server/queue/SendPerfTest.java (renamed from java/systests/src/test/java/org/apache/qpid/server/queue/SendPerfTest.java)7
-rw-r--r--java/systests/src/old_test/java/org/apache/qpid/server/util/ConcurrentTest.java (renamed from java/systests/src/test/java/org/apache/qpid/server/util/ConcurrentTest.java)0
-rw-r--r--java/systests/src/old_test/java/org/apache/qpid/test/unit/ack/DisconnectAndRedeliverTest.java (renamed from java/systests/src/test/java/org/apache/qpid/test/unit/ack/DisconnectAndRedeliverTest.java)0
-rw-r--r--java/systests/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java (renamed from java/systests/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTest.java)44
-rw-r--r--java/systests/src/test/java/org/apache/qpid/server/exchange/HeadersExchangeTest.java30
-rw-r--r--java/systests/src/test/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java151
-rw-r--r--java/systests/src/test/java/org/apache/qpid/server/queue/ConcurrencyTest.java6
-rw-r--r--java/systests/src/test/java/org/apache/qpid/server/queue/DeliveryManagerTest.java8
-rw-r--r--java/systests/src/test/java/org/apache/qpid/server/queue/SubscriptionManagerTest.java18
-rw-r--r--java/systests/src/test/java/org/apache/qpid/server/queue/SubscriptionSetTest.java14
-rw-r--r--java/systests/src/test/java/org/apache/qpid/server/queue/SubscriptionTestHelper.java (renamed from java/systests/src/test/java/org/apache/qpid/server/queue/TestSubscription.java)12
-rw-r--r--java/systests/src/test/java/org/apache/qpid/server/queue/SynchronizedDeliveryManagerTest.java1
56 files changed, 1113 insertions, 620 deletions
diff --git a/java/NOTICE.txt b/java/NOTICE.txt
index 876a136521..82d3dbc632 100644
--- a/java/NOTICE.txt
+++ b/java/NOTICE.txt
@@ -28,10 +28,6 @@ includes (binary only):
licensed under identical terms to the MIT/X11 license and
available for download at http://www.slf4j.org/
- - The JMS Compliance Test Suite from the Exolab project.
- Copyright 1999 (C) Exoffice Technologies Inc. All Rights Reserved.
- JMS CTS is available from http://www.exolab.org/
-
- Software from the Eclipse project. The binaries from this project are
distributed under the Eclipse Public License and can be donwloaded
from http://www.eclipse.org/
diff --git a/java/distribution/pom.xml b/java/distribution/pom.xml
index 65e5cb7aa1..ca91c222ee 100644
--- a/java/distribution/pom.xml
+++ b/java/distribution/pom.xml
@@ -36,6 +36,14 @@
<qpid.version>${pom.version}</qpid.version>
<qpid.targetDir>${project.build.directory}</qpid.targetDir>
</properties>
+
+ <repositories>
+ <repository>
+ <id>repo1.maven.org</id>
+ <name>Maven eclipse Repository</name>
+ <url>http://repo1.maven.org/eclipse</url>
+ </repository>
+ </repositories>
<dependencies>
<dependency>
@@ -53,6 +61,11 @@
<artifactId>qpid-client</artifactId>
<version>${pom.version}</version>
</dependency>
+ <dependency>
+ <groupId>${pom.groupId}.management</groupId>
+ <artifactId>org.apache.qpid.management.ui</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
</dependencies>
<build>
@@ -116,6 +129,8 @@
<descriptor>src/main/assembly/bin.xml</descriptor>
<descriptor>src/main/assembly/client-bin.xml</descriptor>
<descriptor>src/main/assembly/src.xml</descriptor>
+ <descriptor>src/main/assembly/management-eclipse-plugin.xml</descriptor>
+ <descriptor>src/main/assembly/management-eclipse-plugin-unix.xml</descriptor>
</descriptors>
<finalName>qpid-${pom.version}</finalName>
</configuration>
diff --git a/java/distribution/src/main/assembly/bin.xml b/java/distribution/src/main/assembly/bin.xml
index 80ae153355..9b0a56a744 100644
--- a/java/distribution/src/main/assembly/bin.xml
+++ b/java/distribution/src/main/assembly/bin.xml
@@ -31,36 +31,36 @@
<directory>src/main/release</directory>
<outputDirectory>qpid-${qpid.version}</outputDirectory>
<includes>
- <include>DISCLAIMER</include>
+ <include>DISCLAIMER</include>
</includes>
</fileSet>
<fileSet>
<directory>..</directory>
<outputDirectory>qpid-${qpid.version}</outputDirectory>
<includes>
- <include>*.txt</include>
+ <include>*.txt</include>
</includes>
</fileSet>
<fileSet>
<directory>src/main/release/etc</directory>
<outputDirectory>qpid-${qpid.version}/etc</outputDirectory>
<includes>
- <include>logging.properties</include>
- <include>log4j.properties</include>
+ <include>logging.properties</include>
+ <include>log4j.properties</include>
</includes>
</fileSet>
<fileSet>
<directory>src/main/release/docs</directory>
<outputDirectory>qpid-${qpid.version}/docs</outputDirectory>
<includes>
- <include>RELEASE_NOTES.txt</include>
+ <include>RELEASE_NOTES.txt</include>
</includes>
</fileSet>
<fileSet>
<directory>target</directory>
<outputDirectory>qpid-${qpid.version}/lib</outputDirectory>
<includes>
- <include>qpid-incubating.jar</include>
+ <include>qpid-incubating.jar</include>
</includes>
</fileSet>
</fileSets>
@@ -145,7 +145,26 @@
<outputDirectory>qpid-${qpid.version}/lib</outputDirectory>
<unpack>false</unpack>
<excludes>
- <exclude>org.apache.qpid:qpid-distribution</exclude>
+ <exclude>org.apache.qpid:qpid-distribution</exclude>
+ <exclude>org.apache.qpid.management:org.apache.qpid.management.ui</exclude>
+ <exclude>org.eclipse.core:org.eclipse.core.commands</exclude>
+ <exclude>org.eclipse.core:org.eclipse.core.contenttype</exclude>
+ <exclude>org.eclipse.core:org.eclipse.core.expressions</exclude>
+ <exclude>org.eclipse.core:org.eclipse.core.jobs</exclude>
+ <exclude>org.eclipse.core:org.eclipse.core.runtime</exclude>
+ <exclude>org.eclipse.core:org.eclipse.core.runtime.compatibility.auth</exclude>
+ <exclude>org.eclipse.core:org.eclipse.core.runtime.compatibility.registry</exclude>
+ <exclude>org.eclipse.equinox:org.eclipse.equinox.common</exclude>
+ <exclude>org.eclipse.equinox:org.eclipse.equinox.preferences</exclude>
+ <exclude>org.eclipse.equinox:org.eclipse.equinox.registry</exclude>
+ <exclude>org.eclipse.help:org.eclipse.help</exclude>
+ <exclude>org.eclipse.jface:org.eclipse.jface</exclude>
+ <exclude>org.eclipse.osgi:org.eclipse.osgi</exclude>
+ <exclude>org.eclipse.swt:org.eclipse.swt</exclude>
+ <exclude>org.eclipse.swt:org.eclipse.swt.win32.win32.x86</exclude>
+ <exclude>org.eclipse.ui:org.eclipse.ui</exclude>
+ <exclude>org.eclipse.ui:org.eclipse.ui.forms</exclude>
+ <exclude>org.eclipse.ui:org.eclipse.ui.workbench</exclude>
</excludes>
<scope>runtime</scope>
</dependencySet>
diff --git a/java/distribution/src/main/assembly/client-bin.xml b/java/distribution/src/main/assembly/client-bin.xml
index fe3daf176b..f89b1a39d2 100644
--- a/java/distribution/src/main/assembly/client-bin.xml
+++ b/java/distribution/src/main/assembly/client-bin.xml
@@ -82,6 +82,25 @@
<unpack>false</unpack>
<excludes>
<exclude>org.apache.qpid:qpid-distribution</exclude>
+ <exclude>org.apache.qpid.management:org.apache.qpid.management.ui</exclude>
+ <exclude>org.eclipse.core:org.eclipse.core.commands</exclude>
+ <exclude>org.eclipse.core:org.eclipse.core.contenttype</exclude>
+ <exclude>org.eclipse.core:org.eclipse.core.expressions</exclude>
+ <exclude>org.eclipse.core:org.eclipse.core.jobs</exclude>
+ <exclude>org.eclipse.core:org.eclipse.core.runtime</exclude>
+ <exclude>org.eclipse.core:org.eclipse.core.runtime.compatibility.auth</exclude>
+ <exclude>org.eclipse.core:org.eclipse.core.runtime.compatibility.registry</exclude>
+ <exclude>org.eclipse.equinox:org.eclipse.equinox.common</exclude>
+ <exclude>org.eclipse.equinox:org.eclipse.equinox.preferences</exclude>
+ <exclude>org.eclipse.equinox:org.eclipse.equinox.registry</exclude>
+ <exclude>org.eclipse.help:org.eclipse.help</exclude>
+ <exclude>org.eclipse.jface:org.eclipse.jface</exclude>
+ <exclude>org.eclipse.osgi:org.eclipse.osgi</exclude>
+ <exclude>org.eclipse.swt:org.eclipse.swt</exclude>
+ <exclude>org.eclipse.swt:org.eclipse.swt.win32.win32.x86</exclude>
+ <exclude>org.eclipse.ui:org.eclipse.ui</exclude>
+ <exclude>org.eclipse.ui:org.eclipse.ui.forms</exclude>
+ <exclude>org.eclipse.ui:org.eclipse.ui.workbench</exclude>
</excludes>
<scope>runtime</scope>
</dependencySet>
diff --git a/java/distribution/src/main/assembly/management-eclipse-plugin-unix.xml b/java/distribution/src/main/assembly/management-eclipse-plugin-unix.xml
new file mode 100644
index 0000000000..5ac131b12b
--- /dev/null
+++ b/java/distribution/src/main/assembly/management-eclipse-plugin-unix.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<assembly>
+ <!-- id typically identifies the "type" (src vs bin etc) of the assembly -->
+ <id>eclipse-plugin-unix</id>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <formats>
+ <format>tar.gz</format>
+ <format>zip</format>
+ </formats>
+<!--
+ <moduleSets>
+ <moduleSet>
+ <includes>
+ <include>org.apache.qpid.management:org.apache.qpid.management.ui</include>
+ </includes>
+ <binaries>
+ <includeDependencies>true</includeDependencies>
+ <unpack>false</unpack>
+ </binaries>
+ </moduleSet>
+ </moduleSets>
+ -->
+ <fileSets>
+ <fileSet>
+ <directory>src/main/release</directory>
+ <outputDirectory>qpidmc</outputDirectory>
+ <includes>
+ <include>DISCLAIMER</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>..</directory>
+ <outputDirectory>qpidmc</outputDirectory>
+ <includes>
+ <include>*.txt</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>src/main/release/docs</directory>
+ <outputDirectory>qpidmc/docs</outputDirectory>
+ <includes>
+ <include>RELEASE_NOTES.txt</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>../management/eclipse-plugin/src/main/resources/unix/configuration</directory>
+ <outputDirectory>qpidmc/configuration</outputDirectory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>../management/eclipse-plugin/src/main/resources</directory>
+ <outputDirectory>qpidmc</outputDirectory>
+ <includes>
+ <include>license.eclipse.txt</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>../management/eclipse-plugin/bin</directory>
+ <outputDirectory>qpidmc/bin</outputDirectory>
+ <includes>
+ <include>qpidmc.sh</include>
+ </includes>
+ <fileMode>777</fileMode>
+ </fileSet>
+ </fileSets>
+
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>qpidmc/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.0</outputDirectory>
+ <outputFileNameMapping>${artifactId}_${version}/</outputFileNameMapping>
+ <unpack>true</unpack>
+ <includes>
+ <include>org.eclipse.core:org.eclipse.core.runtime.compatibility.registry</include>
+ </includes>
+ <scope>runtime</scope>
+ </dependencySet>
+
+ <dependencySet>
+ <outputDirectory>qpidmc/eclipse/plugins</outputDirectory>
+ <outputFileNameMapping>${artifactId}_${version}.${extension}</outputFileNameMapping>
+ <unpack>false</unpack>
+ <excludes>
+ <exclude>org.apache.qpid:qpid-distribution</exclude>
+ </excludes>
+ <includes>
+ <include>org.eclipse.ui:org.eclipse.ui.forms</include>
+ <include>org.apache.qpid.management:org.apache.qpid.management.ui</include>
+ </includes>
+ <scope>runtime</scope>
+ </dependencySet>
+</dependencySets>
+</assembly>
diff --git a/java/distribution/src/main/assembly/management-eclipse-plugin.xml b/java/distribution/src/main/assembly/management-eclipse-plugin.xml
new file mode 100644
index 0000000000..945d4fa5d8
--- /dev/null
+++ b/java/distribution/src/main/assembly/management-eclipse-plugin.xml
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<assembly>
+ <!-- id typically identifies the "type" (src vs bin etc) of the assembly -->
+ <id>eclipse-plugin</id>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <formats>
+ <format>zip</format>
+ </formats>
+<!--
+ <moduleSets>
+ <moduleSet>
+ <includes>
+ <include>org.apache.qpid.management:org.apache.qpid.management.ui</include>
+ </includes>
+ <binaries>
+ <includeDependencies>true</includeDependencies>
+ <unpack>false</unpack>
+ </binaries>
+ </moduleSet>
+ </moduleSets>
+ -->
+ <fileSets>
+ <fileSet>
+ <directory>src/main/release</directory>
+ <outputDirectory>qpidmc</outputDirectory>
+ <includes>
+ <include>DISCLAIMER</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>..</directory>
+ <outputDirectory>qpidmc</outputDirectory>
+ <includes>
+ <include>*.txt</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>src/main/release/docs</directory>
+ <outputDirectory>qpidmc/docs</outputDirectory>
+ <includes>
+ <include>RELEASE_NOTES.txt</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>../management/eclipse-plugin/src/main/resources/win32/configuration</directory>
+ <outputDirectory>qpidmc/configuration</outputDirectory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>../management/eclipse-plugin/src/main/resources</directory>
+ <outputDirectory>qpidmc/eclipse</outputDirectory>
+ <includes>
+ <include>*.*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>../management/eclipse-plugin/bin</directory>
+ <outputDirectory>qpidmc/bin</outputDirectory>
+ <includes>
+ <include>**</include>
+ </includes>
+ <fileMode>777</fileMode>
+ </fileSet>
+ </fileSets>
+
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>qpidmc/eclipse/plugins</outputDirectory>
+ <outputFileNameMapping>${artifactId}_${version}.${extension}</outputFileNameMapping>
+ <unpack>false</unpack>
+ <excludes>
+ <exclude>org.apache.qpid:qpid-distribution</exclude>
+ <exclude>org.apache.qpid:qpid-common</exclude>
+ <exclude>org.apache.qpid:qpid-broker</exclude>
+ <exclude>org.apache.qpid:qpid-client</exclude>
+ <exclude>commons-cli:commons-cli</exclude>
+ <exclude>commons-configuration:commons-configuration</exclude>
+ <exclude>commons-lang:commons-lang</exclude>
+ <exclude>org.apache.mina:mina-filter-ssl</exclude>
+ <exclude>org.apache.mina:mina-java5</exclude>
+ <exclude>backport-util-concurrent:backport-util-concurrent</exclude>
+ <exclude>org.slf4j:slf4j-simple</exclude>
+ <exclude>junit:junit</exclude>
+ <exclude>org.easymock:easymockclassextension</exclude>
+ <exclude>commons-codec:commons-codec</exclude>
+ <exclude>org.apache.geronimo.specs:geronimo-jms_1.1_spec</exclude>
+ <exclude>commons-collections:commons-collections</exclude>
+ <exclude>commons-lang:commons-lang</exclude>
+ <exclude>org.apache.mina:mina-core</exclude>
+ <exclude>commons-beanutils:commons-beanutils</exclude>
+ <exclude>commons-beanutils:commons-beanutils-core</exclude>
+ <exclude>commons-digester:commons-digester</exclude>
+ <exclude>commons-logging:commons-logging</exclude>
+ <exclude>commons-logging:commons-logging-api</exclude>
+ <exclude>dom4j:dom4j</exclude>
+ <exclude>isorelax:isorelax</exclude>
+ <exclude>jaxen:jaxen</exclude>
+ <exclude>log4j:log4j</exclude>
+ <exclude>msv:msv</exclude>
+ <exclude>xalan:xalan</exclude>
+ <exclude>xml-apis:xml-apis</exclude>
+ <exclude>saxpath:saxpath</exclude>
+ <exclude>servletapi:servletapi</exclude>
+ <exclude>relaxngDatatype:relaxngDatatype</exclude>
+ <exclude>xerces:xercesImpl</exclude>
+ <exclude>javax.servlet:servlet-api</exclude>
+ <exclude>org.eclipse.core:org.eclipse.core.runtime.compatibility.registry</exclude>
+ </excludes>
+ <scope>runtime</scope>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>qpidmc/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.0</outputDirectory>
+ <outputFileNameMapping>${artifactId}_${version}/</outputFileNameMapping>
+ <unpack>true</unpack>
+ <includes>
+ <include>org.eclipse.core:org.eclipse.core.runtime.compatibility.registry</include>
+ </includes>
+ <scope>runtime</scope>
+ </dependencySet>
+ </dependencySets>
+
+</assembly>
diff --git a/java/distribution/src/main/assembly/src.xml b/java/distribution/src/main/assembly/src.xml
index 98040691ab..b66425c3d2 100644
--- a/java/distribution/src/main/assembly/src.xml
+++ b/java/distribution/src/main/assembly/src.xml
@@ -31,41 +31,44 @@
<directory>src/main/release</directory>
<outputDirectory>qpid-${qpid.version}-src</outputDirectory>
<includes>
- <include>DISCLAIMER</include>
- <include>LICENSE</include>
- <include>licenses/*.*</include>
- <include>NOTICE</include>
- <include>README</include>
- <include>BUILDING.txt</include>
+ <include>DISCLAIMER</include>
+ <include>LICENSE</include>
+ <include>licenses/*.*</include>
+ <include>NOTICE</include>
+ <include>README</include>
+ <include>BUILDING.txt</include>
</includes>
</fileSet>
<fileSet>
<directory>..</directory>
<outputDirectory>qpid-${qpid.version}-src</outputDirectory>
<includes>
- <include>**/*</include>
+ <include>**/*</include>
</includes>
<excludes>
- <exclude>build.xml</exclude>
- <exclude>distribution/build.xml</exclude>
- <exclude>benchmark</exclude>
- <exclude>benchmark/**/*</exclude>
- <exclude>**/target</exclude>
- <exclude>**/target/**/*</exclude>
- <exclude>**/build</exclude>
- <exclude>**/build/**/*</exclude>
- <exclude>**/.settings</exclude>
- <exclude>**/.classpath</exclude>
- <exclude>**/.project</exclude>
- <exclude>**/.wtpmodules</exclude>
- <exclude>**/surefire*</exclude>
- <exclude>**/cobertura.ser</exclude>
- <exclude>bin</exclude>
- <exclude>bin/*</exclude>
- <exclude>lib</exclude>
- <exclude>lib/**/*</exclude>
- <exclude>**/var/journal</exclude>
- <exclude>**/build.out*</exclude>
+ <exclude>build.xml</exclude>
+ <exclude>distribution/build.xml</exclude>
+ <exclude>benchmark</exclude>
+ <exclude>benchmark/**/*</exclude>
+ <exclude>**/target</exclude>
+ <exclude>**/target/**/*</exclude>
+ <exclude>**/build</exclude>
+ <exclude>**/build/**/*</exclude>
+ <exclude>**/.settings</exclude>
+ <exclude>**/.classpath</exclude>
+ <exclude>**/.project</exclude>
+ <exclude>**/.wtpmodules</exclude>
+ <exclude>**/surefire*</exclude>
+ <exclude>**/cobertura.ser</exclude>
+ <exclude>bin</exclude>
+ <exclude>bin/*</exclude>
+ <exclude>lib</exclude>
+ <exclude>lib/**/*</exclude>
+ <exclude>**/var/journal</exclude>
+ <exclude>**/build.out*</exclude>
+ <exclude>**/eclipse-plugin/bin/**</exclude>
+ <exclude>**/eclipse-plugin/plugins/**</exclude>
+ <exclude>**/eclipse-plugin/src/main/resources/**</exclude>
</excludes>
</fileSet>
</fileSets>
diff --git a/java/management/eclipse-plugin/META-INF/MANIFEST.MF b/java/management/eclipse-plugin/META-INF/MANIFEST.MF
index e1859bbf1a..5e5ba41be0 100644
--- a/java/management/eclipse-plugin/META-INF/MANIFEST.MF
+++ b/java/management/eclipse-plugin/META-INF/MANIFEST.MF
@@ -9,3 +9,4 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.ui.forms
Eclipse-LazyStart: true
+Bundle-Vendor: Apache Software Foundation
diff --git a/java/management/eclipse-plugin/README.txt b/java/management/eclipse-plugin/README.txt
index 284cf8e8d9..2cbfbc623c 100644
--- a/java/management/eclipse-plugin/README.txt
+++ b/java/management/eclipse-plugin/README.txt
@@ -3,5 +3,5 @@ Running the Qpid Management Console (eclipse-plugin)
----------------------------------------------------
To run the management console, set the QPIDMC_HOME environment variable to
-management eclipse-plugin directory and add $QPIDMC_HOME/bin to your PATH.
+qpid management console root directory (e.g. C:/qpidmc)and add $QPIDMC_HOME/bin to your PATH.
Then run the qpidmc.bat batch file to launch the management console.
diff --git a/java/management/eclipse-plugin/bin/qpidmc.bat b/java/management/eclipse-plugin/bin/qpidmc.bat
index 4ddb88d22c..6250b53e68 100644
--- a/java/management/eclipse-plugin/bin/qpidmc.bat
+++ b/java/management/eclipse-plugin/bin/qpidmc.bat
@@ -52,4 +52,4 @@ goto exit
rem Slurp the command line arguments. This loop allows for an unlimited number
rem of agruments (up to the command line limit, anyway).
-"%JAVA_HOME%\bin\java" -Xms40m -Xmx256m -Declipse.consoleLog=true -jar %QPIDMC_HOME%\startup.jar org.eclipse.core.launcher.Main -name "Qpid Management Console" -nosplash -application org.apache.qpid.management.ui.application -data %QPIDMC_HOME%\data -configuration "file:%QPIDMC_HOME%/configuration" -os win32 -ws win32 -arch x86
+"%JAVA_HOME%\bin\java" -Xms40m -Xmx256m -Declipse.consoleLog=true -jar %QPIDMC_HOME%\eclipse\startup.jar org.eclipse.core.launcher.Main -launcher %QPIDMC_HOME%\eclipse\eclipse -name "Qpid Management Console" -showsplash 600 -configuration "file:%QPIDMC_HOME%\configuration" -os win32 -ws win32 -arch x86
diff --git a/java/management/eclipse-plugin/bin/qpidmc.sh b/java/management/eclipse-plugin/bin/qpidmc.sh
index 9d2d075a5e..c9ab423fdd 100755
--- a/java/management/eclipse-plugin/bin/qpidmc.sh
+++ b/java/management/eclipse-plugin/bin/qpidmc.sh
@@ -1,21 +1,3 @@
#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-"$JAVA_HOME/bin/java" -Xms40m -Xmx256m -Declipse.consoleLog=true -jar $QPIDMC_HOME/startup.jar org.eclipse.core.launcher.Main -name "Qpid Management Console" -showsplash 600 -application org.apache.qpid.management.ui.application -data $QPIDMC_HOME/data -configuration "file:$QPIDMC_HOME/configuration" \ No newline at end of file
+"$JAVA_HOME/bin/java" -Xms40m -Xmx256m -Declipse.consoleLog=false -jar $QPIDMC_HOME/eclipse/startup.jar org.eclipse.core.launcher.Main -launcher $QPIDMC_HOME/eclipse/eclipse -name "Qpid Management Console" -showsplash 600 -configuration "file:$QPIDMC_HOME/configuration"
diff --git a/java/management/eclipse-plugin/build.properties b/java/management/eclipse-plugin/build.properties
deleted file mode 100644
index d9eefdc502..0000000000
--- a/java/management/eclipse-plugin/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/main/java/
-output.. = target/classes/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- plugin.properties,\
- splash.bmp
diff --git a/java/management/eclipse-plugin/build.xml b/java/management/eclipse-plugin/build.xml
deleted file mode 100644
index 407381b03f..0000000000
--- a/java/management/eclipse-plugin/build.xml
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<project name="org.apache.qpid.management.ui" default="build.update.jar" basedir=".">
-
- <property name="basews" value="${ws}"/>
- <property name="baseos" value="${os}"/>
- <property name="basearch" value="${arch}"/>
- <property name="basenl" value="${nl}"/>
-
- <!-- Compiler settings. -->
- <property name="javacFailOnError" value="false"/>
- <property name="javacDebugInfo" value="on"/>
- <property name="javacVerbose" value="false"/>
- <property name="logExtension" value=".log"/>
- <property name="compilerArg" value=""/>
- <property name="javacSource" value="1.5"/>
- <property name="javacTarget" value="1.5"/>
- <path id="path_bootclasspath">
- <fileset dir="${java.home}/lib">
- <include name="*.jar"/>
- </fileset>
- </path>
- <property name="bootclasspath" refid="path_bootclasspath"/>
- <property name="bundleJavacSource" value="${javacSource}"/>
- <property name="bundleJavacTarget" value="${javacTarget}"/>
- <property name="bundleBootClasspath" value="${bootclasspath}"/>
- <property name="pluginName" value="org.apache.qpid.management.ui"/>
- <property name="distName" value="qpidmc"/>
- <property name="version" value="0.1.0"/>
-
- <target name="init" depends="properties">
- <condition property="pluginTemp" value="${buildTempFolder}/plugins">
- <isset property="buildTempFolder"/>
- </condition>
- <property name="pluginTemp" value="${basedir}"/>
- <condition property="build.result.folder" value="${pluginTemp}/eclipse-plugin">
- <isset property="buildTempFolder"/>
- </condition>
- <property name="build.result.folder" value="${basedir}"/>
- <property name="temp.folder" value="${basedir}/temp.folder"/>
- <property name="plugin.destination" value="${basedir}"/>
- <property name="target.folder" value="${basedir}/target"/>
- <property name="compile.folder" value="${target.folder}/classes"/>
- <property name="plugins.folder" value="${basedir}/plugins"/>
- </target>
-
- <target name="properties" if="eclipse.running">
- <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
-
- </target>
-
- <target name="build.update.jar" depends="init" description="Build the plug-in: org.apache.qpid.management.ui for an update site.">
- <delete dir="${temp.folder}"/>
- <mkdir dir="${temp.folder}"/>
- <antcall target="build.jars"/>
- <antcall target="gather.bin.parts">
- <param name="destination.temp.folder" value="${temp.folder}/"/>
- </antcall>
- <zip destfile="${plugins.folder}/${pluginName}_${version}.jar" basedir="${temp.folder}/${pluginName}" filesonly="false" whenempty="skip" update="false"/>
- <delete dir="${temp.folder}"/>
- </target>
-
- <target name="compile" depends="init" unless="compile" description="Create jar: org.apache.qpid.management.ui compile.">
- <delete dir="${temp.folder}/compile.bin"/>
- <mkdir dir="${temp.folder}/compile.bin"/>
- <path id="compile.classpath">
- <pathelement path="plugins/org.eclipse.ui_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.core.runtime_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.osgi_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.equinox.common_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.core.jobs_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.core.runtime.compatibility.registry_3.2.0/runtime_registry_compatibility.jar"/>
- <pathelement path="plugins/org.eclipse.equinox.registry_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.equinox.preferences_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.core.contenttype_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.core.runtime.compatibility.auth_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.swt_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.swt.win32.win32.x86_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.jface_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.core.commands_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.ui.workbench_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.ui.workbench.compatibility_3.2.0/compatibility.jar"/>
- <pathelement path="plugins/com.ibm.icu_3.4.4.1.jar"/>
- <pathelement path="plugins/org.eclipse.help_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.core.expressions_3.2.0.jar"/>
- <pathelement path="plugins/org.eclipse.ui.forms_3.2.0.jar"/>
- </path>
- <!-- compile the source code -->
- <javac destdir="${temp.folder}/compile.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}" >
- <compilerarg line="${compilerArg}" compiler="${build.compiler}"/>
- <classpath refid="compile.classpath" />
- <src path="src/main/java/" />
- <!--compilerarg value="@${basedir}/javaCompiler...args" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" -->
- <compilerarg line="-log '${temp.folder}/compile.bin${logExtension}'" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/>
- </javac>
- <!-- Copy necessary resources -->
- <copy todir="${temp.folder}/compile.bin" failonerror="true" overwrite="false">
- <fileset dir="src/main/java/" excludes="**/*.java, **/package.htm*" />
- </copy>
- <mkdir dir="${build.result.folder}"/>
- <copy todir="${target.folder}/classes" failonerror="true" overwrite="false">
- <fileset dir="${temp.folder}/compile.bin" />
- </copy>
- <delete dir="${temp.folder}/compile.bin"/>
- </target>
-
- <target name="src.zip" depends="init" unless="src.zip">
- <mkdir dir="${build.result.folder}"/>
- <zip destfile="${build.result.folder}/src.zip" filesonly="false" whenempty="skip" update="false">
- <fileset dir="src/main/java/" includes="**/*.java" />
- </zip>
- </target>
-
- <target name="build.jars" depends="init" description="Build all the jars for the plug-in: org.apache.qpid.management.ui.">
- <available property="compile" file="${target.folder}/classes"/>
- <antcall target="compile"/>
- </target>
-
- <target name="build.sources" depends="init">
- <available property="src.zip" file="${build.result.folder}/src.zip"/>
- <antcall target="src.zip"/>
- </target>
-
- <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
- <mkdir dir="${destination.temp.folder}/${pluginName}"/>
- <copy todir="${destination.temp.folder}/${pluginName}" failonerror="true" overwrite="false">
- <fileset dir="${target.folder}/classes" includes="**"/>
- </copy>
- <copy todir="${destination.temp.folder}/${pluginName}" failonerror="true" overwrite="false">
- <fileset dir="${basedir}" includes="plugin.xml,META-INF/,icons/,plugin.properties,splash.bmp"/>
- </copy>
- </target>
-
- <target name="gather.sources" depends="init" if="destination.temp.folder">
- <mkdir dir="${destination.temp.folder}"/>
- <copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}" failonerror="false" overwrite="false"/>
- </target>
-
- <target name="gather.logs" depends="init" if="destination.temp.folder">
- <mkdir dir="${destination.temp.folder}/${pluginName}_${version}"/>
- <copy file="${temp.folder}/compile.bin${logExtension}" todir="${destination.temp.folder}/${pluginName}_${version}" failonerror="false" overwrite="false"/>
- </target>
-
- <target name="clean" depends="init" description="Clean the plug-in: org.apache.qpid.management.ui of all the zips, jars and logs created.">
- <delete dir="${target.folder}/classes"/>
- <delete file="${build.result.folder}/src.zip"/>
- <delete file="${plugins.folder}/${pluginName}_${version}.jar"/>
- <delete file="${target.folder}/${pluginName}_${version}.zip"/>
- <delete file="${target.folder}/${distName}_${version}.zip"/>
- <delete dir="${temp.folder}"/>
- </target>
-
- <target name="build.zip" depends="init" description="Create a zip containing all the elements for the plug-in: org.apache.qpid.management.ui.">
- <delete dir="${temp.folder}"/>
- <mkdir dir="${temp.folder}"/>
- <antcall target="build.update.jar"/>
- <antcall target="build.sources"/>
- <antcall target="gather.sources">
- <param name="destination.temp.folder" value="${temp.folder}/plugins/${pluginName}_${version}/"/>
- </antcall>
- <delete>
- <fileset dir="${temp.folder}" includes="**/*.bin${logExtension}"/>
- </delete>
- <copy todir="${temp.folder}/plugins" failonerror="true" overwrite="false">
- <fileset dir="${plugins.folder}" includes="${pluginName}_${version}.jar"/>
- </copy>
- <zip destfile="${target.folder}/${pluginName}_${version}.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
- <delete dir="${temp.folder}"/>
- </target>
-
- <target name="dist" depends="init" description="Create a zip containing all the elements for deploying the plug-in: org.apache.qpid.management.ui.">
- <antcall target="clean"/>
- <antcall target="build.update.jar"/>
- <antcall target="build.sources"/>
- <antcall target="gather.sources">
- <param name="destination.temp.folder" value="${temp.folder}/${distName}"/>
- </antcall>
- <copy todir="${temp.folder}/${distName}/plugins" failonerror="true" overwrite="false">
- <fileset dir="${plugins.folder}" includes="**" />
- </copy>
- <copy todir="${temp.folder}/${distName}/bin" failonerror="true" overwrite="false">
- <fileset dir="${basedir}/bin" includes="**" />
- </copy>
- <copy todir="${temp.folder}/${distName}" failonerror="true" overwrite="false">
- <fileset dir="${basedir}" includes="startup.jar,plugin.xml,META-INF/,icons/,plugin.properties,splash.bmp"/>
- </copy>
- <copy todir="${temp.folder}/${distName}/configuration" failonerror="true" overwrite="false">
- <fileset dir="${basedir}/configuration" includes="**"/>
- </copy>
-
- <delete>
- <fileset dir="${temp.folder}" includes="**/*.bin${logExtension}"/>
- </delete>
- <zip destfile="${target.folder}/${distName}_${version}.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
- <delete dir="${temp.folder}"/>
- </target>
-
-</project>
diff --git a/java/management/eclipse-plugin/icons/qpidmc16.gif b/java/management/eclipse-plugin/icons/qpidmc16.gif
new file mode 100644
index 0000000000..4df535bb9a
--- /dev/null
+++ b/java/management/eclipse-plugin/icons/qpidmc16.gif
Binary files differ
diff --git a/java/management/eclipse-plugin/splash.bmp b/java/management/eclipse-plugin/icons/splash.bmp
index b528a508c5..b528a508c5 100644
--- a/java/management/eclipse-plugin/splash.bmp
+++ b/java/management/eclipse-plugin/icons/splash.bmp
Binary files differ
diff --git a/java/management/eclipse-plugin/plugin.xml b/java/management/eclipse-plugin/plugin.xml
index ed30d73532..bd7ae0a474 100644
--- a/java/management/eclipse-plugin/plugin.xml
+++ b/java/management/eclipse-plugin/plugin.xml
@@ -144,7 +144,7 @@
</property>
<property
name="windowImages"
- value="icons/qpidmc32.gif">
+ value="icons/qpidmc16.gif,icons/qpidmc32.gif">
</property>
<property
name="aboutText"
diff --git a/java/management/eclipse-plugin/pom.xml b/java/management/eclipse-plugin/pom.xml
new file mode 100644
index 0000000000..71b2a08058
--- /dev/null
+++ b/java/management/eclipse-plugin/pom.xml
@@ -0,0 +1,216 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.qpid.management</groupId>
+ <artifactId>org.apache.qpid.management.ui</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-incubating-M2-SNAPSHOT</version>
+ <name>Qpid Management</name>
+ <url>http://cwiki.apache.org/confluence/display/qpid</url>
+
+ <parent>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid</artifactId>
+ <version>1.0-incubating-M2-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ <topDirectoryLocation>../../</topDirectoryLocation>
+ </properties>
+
+ <repositories>
+ <repository>
+ <id>repo1.maven.org</id>
+ <name>Maven eclipse Repository</name>
+ <url>http://repo1.maven.org/eclipse</url>
+ </repository>
+ <repository>
+ <id>apache.snapshots</id>
+ <name>Apache SNAPSHOT Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.ibm.icu</groupId>
+ <artifactId>com.ibm.icu</artifactId>
+ <version>3.4.4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jface</groupId>
+ <artifactId>org.eclipse.jface</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.core</groupId>
+ <artifactId>org.eclipse.core.commands</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.core</groupId>
+ <artifactId>org.eclipse.core.contenttype</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.core</groupId>
+ <artifactId>org.eclipse.core.expressions</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.core</groupId>
+ <artifactId>org.eclipse.core.jobs</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.core</groupId>
+ <artifactId>org.eclipse.core.runtime</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.core</groupId>
+ <artifactId>org.eclipse.core.runtime.compatibility.auth</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.core</groupId>
+ <artifactId>org.eclipse.core.runtime.compatibility.registry</artifactId>
+ <version>3.2.0</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.equinox</groupId>
+ <artifactId>org.eclipse.equinox.common</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.equinox</groupId>
+ <artifactId>org.eclipse.equinox.preferences</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.equinox</groupId>
+ <artifactId>org.eclipse.equinox.registry</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.help</groupId>
+ <artifactId>org.eclipse.help</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.osgi</groupId>
+ <artifactId>org.eclipse.osgi</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.swt</groupId>
+ <artifactId>org.eclipse.swt.win32.win32.x86</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.swt</groupId>
+ <artifactId>org.eclipse.swt</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.ui</groupId>
+ <artifactId>org.eclipse.ui.forms</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.ui</groupId>
+ <artifactId>org.eclipse.ui.workbench</artifactId>
+ <version>3.2.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.ui</groupId>
+ <artifactId>org.eclipse.ui</artifactId>
+ <version>3.2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>icons/</directory>
+ <targetPath>icons/</targetPath>
+ <includes>
+ <include>**</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>icons/</directory>
+ <targetPath>/</targetPath>
+ <includes>
+ <include>splash.bmp</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>${basedir}</directory>
+ <targetPath>/</targetPath>
+ <includes>
+ <include>plugin.xml</include>
+ <include>plugin.properties</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile>META-INF/MANIFEST.MF</manifestFile>
+ </archive>
+ <finalName>${artifactId}_${version}</finalName>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Activator.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Activator.java
index 61b6cfaa59..5eab267c28 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Activator.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Activator.java
@@ -26,6 +26,7 @@ import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
+ * @author Bhupendra Bhardwaj
*/
public class Activator extends AbstractUIPlugin
{
@@ -44,7 +45,6 @@ public class Activator extends AbstractUIPlugin
}
/*
- * (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception
@@ -53,7 +53,6 @@ public class Activator extends AbstractUIPlugin
}
/*
- * (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception
@@ -67,18 +66,19 @@ public class Activator extends AbstractUIPlugin
*
* @return the shared instance
*/
- public static Activator getDefault() {
+ public static Activator getDefault()
+ {
return plugin;
}
/**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
+ * Returns an image descriptor for the image file at the given plug-in relative path
*
* @param path the path
* @return the image descriptor
*/
- public static ImageDescriptor getImageDescriptor(String path) {
+ public static ImageDescriptor getImageDescriptor(String path)
+ {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
}
}
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Application.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Application.java
index 3d014e6968..a1c4b7ddb0 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Application.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Application.java
@@ -34,8 +34,8 @@ public class Application implements IPlatformRunnable
static Shell shell = null;
/*
- * (non-Javadoc)
- *
+ * The call to createAndRunWorkbench will not return until the workbench is closed.
+ * The SWT event loop and other low-level logistics are handled inside this method.
* @see org.eclipse.core.runtime.IPlatformRunnable#run(java.lang.Object)
*/
public Object run(Object args) throws Exception
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
index 175130aea9..38a4d4561f 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
@@ -33,6 +33,10 @@ import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
+/**
+ * Main Application Registry, which contains shared resources and map to all connected servers.
+ * @author Bhupendra Bhardwaj
+ */
public abstract class ApplicationRegistry
{
private static ImageRegistry imageRegistry = new ImageRegistry();
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationWorkbenchWindowAdvisor.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationWorkbenchWindowAdvisor.java
index 472d003657..3d163fb111 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationWorkbenchWindowAdvisor.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationWorkbenchWindowAdvisor.java
@@ -28,6 +28,10 @@ import org.eclipse.ui.application.IActionBarConfigurer;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.application.WorkbenchWindowAdvisor;
+/**
+ *
+ * @author Bhupendra Bhardwaj
+ */
public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor
{
public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer)
@@ -49,7 +53,7 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor
configurer.setShowCoolBar(true);
configurer.setShowStatusLine(false);
- configurer.setTitle("Qpid Management Console");
+ configurer.setTitle(Constants.APPLICATION_NAME);
}
public void postWindowCreate()
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java
index 1678cbac62..e7cd7f4671 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java
@@ -20,6 +20,11 @@
*/
package org.apache.qpid.management.ui;
+/**
+ * Contains constants for the application
+ * @author Bhupendra Bhardwaj
+ *
+ */
public class Constants
{
public final static String APPLICATION_NAME = "Qpid Management Console";
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedBean.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedBean.java
index 767fd8b721..7da5621345 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedBean.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedBean.java
@@ -22,6 +22,11 @@ package org.apache.qpid.management.ui;
import java.util.HashMap;
+/**
+ * Class representing a managed bean on the managed server
+ * @author Bhupendra Bhardwaj
+ *
+ */
public abstract class ManagedBean extends ManagedObject
{
private String _uniqueName = "";
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedObject.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedObject.java
index 2ed463bdf8..96e0fa46c6 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedObject.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedObject.java
@@ -20,6 +20,10 @@
*/
package org.apache.qpid.management.ui;
+/**
+ * Abstract class representing a managed object
+ * @author Bhupendra Bhardwaj
+ */
public abstract class ManagedObject
{
private String _name;
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedServer.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedServer.java
index 44f933a5d1..e3699bb1ee 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedServer.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedServer.java
@@ -20,6 +20,10 @@
*/
package org.apache.qpid.management.ui;
+/**
+ * Class representing a server being managed eg. MBeanServer
+ * @author Bhupendra Bhardwaj
+ */
public class ManagedServer extends ManagedObject
{
private String host;
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Perspective.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Perspective.java
index 03477cb117..da49d70b88 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Perspective.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Perspective.java
@@ -25,6 +25,10 @@ import org.apache.qpid.management.ui.views.NavigationView;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
+/**
+ *
+ * @author Bhupendra Bhardwaj
+ */
public class Perspective implements IPerspectiveFactory
{
public void createInitialLayout(IPageLayout layout)
@@ -32,20 +36,9 @@ public class Perspective implements IPerspectiveFactory
String editorArea = layout.getEditorArea();
layout.setEditorAreaVisible(false);
- // standalone view meaning it can't be docked or stacked with other views,
- // and it doesn't have a title bar.
-
- layout.addStandaloneView(NavigationView.ID,
- true,
- IPageLayout.LEFT,
- 0.25f,
- editorArea);
-
- layout.addStandaloneView(MBeanView.ID,
- true,
- IPageLayout.RIGHT,
- 0.75f,
- editorArea);
+ // standalone view meaning it can't be docked or stacked with other views, and it doesn't have a title bar.
+ layout.addStandaloneView(NavigationView.ID, true, IPageLayout.LEFT, 0.25f, editorArea);
+ layout.addStandaloneView(MBeanView.ID, true, IPageLayout.RIGHT, 0.75f, editorArea);
layout.getViewLayout(NavigationView.ID).setCloseable(false);
layout.getViewLayout(MBeanView.ID).setCloseable(false);
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/exceptions/ManagementConsoleException.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/exceptions/ManagementConsoleException.java
new file mode 100644
index 0000000000..ba6167591e
--- /dev/null
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/exceptions/ManagementConsoleException.java
@@ -0,0 +1,10 @@
+package org.apache.qpid.management.ui.exceptions;
+
+@SuppressWarnings("serial")
+public class ManagementConsoleException extends Exception
+{
+ public ManagementConsoleException(String message)
+ {
+ super(message);
+ }
+}
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java
index 800a5b6ce3..923fd4a12a 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java
@@ -41,6 +41,7 @@ import javax.management.ReflectionException;
import org.apache.qpid.management.ui.ApplicationRegistry;
import org.apache.qpid.management.ui.ManagedBean;
import org.apache.qpid.management.ui.ManagedServer;
+import org.apache.qpid.management.ui.exceptions.ManagementConsoleException;
import org.apache.qpid.management.ui.model.AttributeData;
import org.apache.qpid.management.ui.model.ManagedAttributeModel;
import org.apache.qpid.management.ui.model.NotificationInfoModel;
@@ -49,31 +50,47 @@ import org.apache.qpid.management.ui.model.OperationDataModel;
import org.apache.qpid.management.ui.model.ParameterData;
import org.apache.qpid.management.ui.views.ViewUtility;
-
+/**
+ * Utility class for all mbeanserver related operations. Keeps all JMX code out from view and model classes
+ * @author Bhupendra Bhardwaj
+ */
public class MBeanUtility
{
-
- public static MBeanInfo getMBeanInfo(ManagedBean mbean)
- throws IOException, JMException
+ /**
+ * Retrieves the MBeanInfo from MBeanServer and stores in the application registry
+ * @param mbean managed bean
+ * @return MBeanInfo
+ * @throws Exception, if server connection is null or if server throws Exception
+ */
+ public static MBeanInfo getMBeanInfo(ManagedBean mbean) throws Exception
{
ManagedServer server = mbean.getServer();
JMXServerRegistry serverRegistry = (JMXServerRegistry)ApplicationRegistry.getServerRegistry(server);
MBeanServerConnection mbsc = serverRegistry.getServerConnection();
if (mbsc == null)
- System.out.println("MBeanServerConnection does not exist in the Application registry.");
+ {
+ throw new ManagementConsoleException("Server connection is broken");
+ }
JMXManagedObject jmxbean = (JMXManagedObject)mbean;
MBeanInfo mbeanInfo = mbsc.getMBeanInfo(jmxbean.getObjectName());
serverRegistry.putMBeanInfo(mbean, mbeanInfo);
+ // populate the server registry with attribute and operation info
getAttributes(mbean);
getOperations(mbean);
return mbeanInfo;
}
-
+ /**
+ * executes the MBean operation
+ * @param mbean
+ * @param opData
+ * @return MBean operation return value
+ * @throws Exception if server connection is broken or if operation execution fails on the mbean server
+ */
public static Object execute(ManagedBean mbean, OperationData opData) throws Exception
{
String opName = opData.getName();
@@ -89,7 +106,6 @@ public class MBeanUtility
{
signature[i] = params.get(i).getType();
values[i] = params.get(i).getValue();
- System.out.println(params.get(i).getName() + " : " + params.get(i).getValue());
}
}
@@ -99,48 +115,27 @@ public class MBeanUtility
MBeanServerConnection mbsc = serverRegistry.getServerConnection();
if (mbsc == null)
{
- System.out.println("MBeanServerConnection doesn't exist in the Application registry.");
+ throw new ManagementConsoleException("Server connection is broken");
// TODO
- // throw exception to check if the server is added
- // Or try and get the connection again if it was disconnected
- return null;
+ // try and get the connection again if it was disconnected
}
JMXManagedObject jmxbean = (JMXManagedObject)mbean;
return mbsc.invoke(jmxbean.getObjectName(), opName, values, signature);
-
- /*
- try
- {
-
- }
- catch(MBeanException ex)
- {
- ex.printStackTrace();
-
- }
- catch(OperationsException ex)
- {
- ex.printStackTrace();
-
- }
- catch(JMException ex)
- {
- ex.printStackTrace();
- ViewUtility.popupError(new Exception(ex), "Operation failed");
- }
- catch(IOException ex)
- {
- ex.printStackTrace();
- ViewUtility.popupError(new Exception(ex), "Operation failed");
- }
- */
}
+ /**
+ * @see MBeanUtility#handleException(ManagedBean, Exception)
+ */
public static void handleException(Exception ex)
{
handleException(null, ex);
}
+ /**
+ * handels the exception received. Shows the exception to the user in best suitable way
+ * @param mbean managed bean
+ * @param ex Exception
+ */
public static void handleException(ManagedBean mbean, Exception ex)
{
if (mbean == null)
@@ -161,17 +156,35 @@ public class MBeanUtility
}
else if (ex instanceof MBeanException)
{
- ViewUtility.popupInfoMessage(mbean.getName(), ex.getMessage());
+ String cause = ((MBeanException)ex).getTargetException().getMessage();
+ if (cause == null)
+ cause = ex.getMessage();
+ ViewUtility.popupInfoMessage(mbean.getName(), cause);
}
- else
+ else if (ex instanceof JMException)
+ {
+ ViewUtility.popupErrorMessage(mbean.getName(), ex.getMessage());
+ }
+ else if (ex instanceof ManagementConsoleException)
+ {
+ ViewUtility.popupErrorMessage(mbean.getName(), ex.getMessage());
+ }
+ else
{
ViewUtility.popupError(mbean.getName(), "Error occured", ex);
}
- ex.printStackTrace();
+ //ex.printStackTrace();
}
+ /**
+ * Registers the notification listener with the MBeanServer
+ * @param mbean managed bean
+ * @param name notification name
+ * @param type notification type
+ * @throws Exception if server connection is broken or if listener could not be created
+ */
public static void createNotificationlistener(ManagedBean mbean, String name, String type)
- throws IOException, Exception
+ throws Exception
{
JMXManagedObject jmxbean = (JMXManagedObject)mbean;
JMXServerRegistry serverRegistry = (JMXServerRegistry)ApplicationRegistry.getServerRegistry(mbean);
@@ -180,23 +193,15 @@ public class MBeanUtility
if (mbsc == null)
{
- throw new Exception("MBeanServer connection is broken");
+ throw new ManagementConsoleException("Server connection is broken");
}
mbsc.addNotificationListener(jmxbean.getObjectName(), serverRegistry.getNotificationListener(), null, null);
- System.out.println("Listener created : " + jmxbean.getObjectName());
}
public static void removeNotificationListener(ManagedBean mbean, String name, String type) throws Exception
{
- //JMXManagedObject jmxbean = (JMXManagedObject)mbean;
JMXServerRegistry serverRegistry = (JMXServerRegistry)ApplicationRegistry.getServerRegistry(mbean);
serverRegistry.removeNotificationListener(mbean, name, type);
- //MBeanServerConnection mbsc = serverRegistry.getServerConnection();
-
- //if (mbsc != null)
- //{
- // mbsc.removeNotificationListener(jmxbean.getObjectName(), serverRegistry.getNotificationListener());
- //}
}
public static int refreshAttribute(ManagedBean mbean, String attribute) throws Exception
@@ -205,7 +210,9 @@ public class MBeanUtility
MBeanServerConnection mbsc = serverRegistry.getServerConnection();
if (mbsc == null)
- throw new Exception("Server connection is not available for " + mbean.getUniqueName());
+ {
+ throw new ManagementConsoleException("Server connection is broken");
+ }
Object value = mbsc.getAttribute(((JMXManagedObject)mbean).getObjectName(), attribute);
@@ -214,7 +221,13 @@ public class MBeanUtility
return Integer.parseInt(String.valueOf(value));
}
- public static ManagedAttributeModel getAttributes(ManagedBean mbean)
+ /**
+ * Retrieves the attribute values from MBeanSever and stores in the server registry.
+ * @param mbean
+ * @return the attribute model
+ * @throws Exception if attributes can not be retrieved from MBeanServer
+ */
+ public static ManagedAttributeModel getAttributes(ManagedBean mbean) throws Exception
{
ObjectName objName = ((JMXManagedObject)mbean).getObjectName();
String[] attributes = null;
@@ -243,29 +256,28 @@ public class MBeanUtility
attributes = attributeModel.getAttributeNames().toArray(new String[0]);
}
- try
+ if (attributes.length != 0)
{
- if (attributes.length != 0)
+ list = mbsc.getAttributes(objName, attributes);
+ for (Iterator itr = list.iterator(); itr.hasNext();)
{
- list = mbsc.getAttributes(objName, attributes);
- for (Iterator itr = list.iterator(); itr.hasNext();)
- {
- Attribute attrib = (Attribute)itr.next();
- attributeModel.setAttributeValue(attrib.getName(), attrib.getValue());
- }
+ Attribute attrib = (Attribute)itr.next();
+ attributeModel.setAttributeValue(attrib.getName(), attrib.getValue());
}
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
}
- serverRegistry.setAttributeModel(mbean, attributeModel);
-
+ serverRegistry.setAttributeModel(mbean, attributeModel);
return attributeModel;
}
- public static void updateAttribute(ManagedBean mbean, AttributeData attribute, String value)
+ /**
+ * Updates the attribute value of an MBean
+ * @param mbean
+ * @param attribute
+ * @param value
+ * @throws Exception if MBeanServer throws exception in updating the attribute value
+ */
+ public static void updateAttribute(ManagedBean mbean, AttributeData attribute, String value) throws Exception
{
JMXManagedObject jmxbean = (JMXManagedObject)mbean;
JMXServerRegistry serverRegistry = (JMXServerRegistry)ApplicationRegistry.getServerRegistry(mbean);
@@ -273,11 +285,7 @@ public class MBeanUtility
MBeanServerConnection mbsc = serverRegistry.getServerConnection();
Object newValue = value;
- if (attribute.getDataType().equals(String.class.getName()))
- {
-
- }
- else if (attribute.getDataType().equals(Long.class.getName()))
+ if (attribute.getDataType().equals(Long.class.getName()))
{
newValue = new Long(Long.parseLong(value));
}
@@ -286,24 +294,20 @@ public class MBeanUtility
newValue = new Integer(Integer.parseInt(value));
}
- try
- {
- mbsc.setAttribute(jmxbean.getObjectName(), new Attribute(attribute.getName(), newValue));
-
- // Update the value in the registry, to avoid refreshing from mbsc
- ManagedAttributeModel attributeModel = serverRegistry.getAttributeModel(mbean);
- attributeModel.setAttributeValue(attribute.getName(), newValue);
- }
- catch(Exception ex)
- {
- ex.printStackTrace();
- }
+ mbsc.setAttribute(jmxbean.getObjectName(), new Attribute(attribute.getName(), newValue));
+ // Update the value in the registry, to avoid refreshing from mbsc
+ ManagedAttributeModel attributeModel = serverRegistry.getAttributeModel(mbean);
+ attributeModel.setAttributeValue(attribute.getName(), newValue);
}
+ /**
+ * populates the operation data model in server registry for given mbean
+ * @param mbean
+ * @return operation data model
+ */
public static OperationDataModel getOperations(ManagedBean mbean)
{
JMXServerRegistry serverRegistry = (JMXServerRegistry)ApplicationRegistry.getServerRegistry(mbean);
-
OperationDataModel dataModel = serverRegistry.getOperationModel(mbean);
if (dataModel == null)
{
@@ -322,6 +326,11 @@ public class MBeanUtility
return dataModel;
}
+ /**
+ * populates the notification in the server registry for given mbean
+ * @param mbean
+ * @return notification info model
+ */
public static NotificationInfoModel[] getNotificationInfo(ManagedBean mbean)
{
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java
index b5c044e7be..04890e4e63 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java
@@ -277,8 +277,16 @@ public class AttributesTabControl extends TabControl
{
public void widgetSelected(SelectionEvent e)
{
- // refresh the attributes list
- refresh(_mbean);
+ try
+ {
+ // refresh the attributes list
+ refresh(_mbean);
+ }
+ catch (Exception ex)
+ {
+ MBeanUtility.handleException(_mbean, ex);
+ }
+
}
});
}
@@ -582,12 +590,19 @@ public class AttributesTabControl extends TabControl
{
public void widgetSelected(SelectionEvent event)
{
- Button button = (Button)event.widget;
- Text text = (Text)button.getData();
- AttributeData data = (AttributeData)button.getParent().getData();
- MBeanUtility.updateAttribute(_mbean, data, text.getText());
- button.getShell().close();
- refresh();
+ try
+ {
+ Button button = (Button)event.widget;
+ Text text = (Text)button.getData();
+ AttributeData data = (AttributeData)button.getParent().getData();
+ MBeanUtility.updateAttribute(_mbean, data, text.getText());
+ button.getShell().close();
+ refresh();
+ }
+ catch (Exception ex)
+ {
+ MBeanUtility.handleException(_mbean, ex);
+ }
}
});
@@ -612,7 +627,15 @@ public class AttributesTabControl extends TabControl
_tableViewer.setInput(null);
return;
}
- ManagedAttributeModel attributesList = MBeanUtility.getAttributes(mbean);
+ ManagedAttributeModel attributesList = null;
+ try
+ {
+ attributesList = MBeanUtility.getAttributes(mbean);
+ }
+ catch(Exception ex)
+ {
+ MBeanUtility.handleException(_mbean, ex);
+ }
_tableViewer.setInput(attributesList);
_table.setItemCount(attributesList.getCount());
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java
index 8563bdb882..c62f90353d 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java
@@ -595,15 +595,6 @@ public class OperationTabControl extends TabControl
else
{
ViewUtility.disposeChildren(_resultsComposite);
- /*
- if (_resultsComposite == null || _resultsComposite.isDisposed())
- {
- _resultsComposite = _toolkit.createComposite(_form.getBody(), SWT.NONE);
- GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
- layoutData.verticalIndent = 20;
- _resultsComposite.setLayoutData(layoutData);
- _resultsComposite.setLayout(new GridLayout());
- }*/
populateResults(result, _resultsComposite);
_resultsComposite.layout();
_form.layout();
diff --git a/java/management/eclipse-plugin/src/main/resources/.eclipseproduct b/java/management/eclipse-plugin/src/main/resources/.eclipseproduct
new file mode 100644
index 0000000000..728766577f
--- /dev/null
+++ b/java/management/eclipse-plugin/src/main/resources/.eclipseproduct
@@ -0,0 +1,5 @@
+#Eclipse Product File
+#Fri Nov 03 14:47:54 GMT 2006
+version=1.0-incubating-M2-SNAPSHOT
+name=Qpid Management Console
+id=org.apache.qpid.manager.gui.product
diff --git a/java/management/eclipse-plugin/src/main/resources/eclipse.exe b/java/management/eclipse-plugin/src/main/resources/eclipse.exe
new file mode 100644
index 0000000000..7826d1ed80
--- /dev/null
+++ b/java/management/eclipse-plugin/src/main/resources/eclipse.exe
Binary files differ
diff --git a/java/management/eclipse-plugin/src/main/resources/eclipse.ini b/java/management/eclipse-plugin/src/main/resources/eclipse.ini
new file mode 100644
index 0000000000..6a4ecb5b5d
--- /dev/null
+++ b/java/management/eclipse-plugin/src/main/resources/eclipse.ini
@@ -0,0 +1,4 @@
+-vmargs
+-Xms40m
+-Xmx256m
+-Declipse.consoleLog=true
diff --git a/java/management/eclipse-plugin/src/main/resources/license.eclipse.txt b/java/management/eclipse-plugin/src/main/resources/license.eclipse.txt
new file mode 100644
index 0000000000..da433e89f9
--- /dev/null
+++ b/java/management/eclipse-plugin/src/main/resources/license.eclipse.txt
@@ -0,0 +1,88 @@
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
+
+
diff --git a/java/management/eclipse-plugin/startup.jar b/java/management/eclipse-plugin/src/main/resources/startup.jar
index 2f26eceece..2f26eceece 100644
--- a/java/management/eclipse-plugin/startup.jar
+++ b/java/management/eclipse-plugin/src/main/resources/startup.jar
Binary files differ
diff --git a/java/management/eclipse-plugin/src/main/resources/unix/configuration/config.ini b/java/management/eclipse-plugin/src/main/resources/unix/configuration/config.ini
new file mode 100644
index 0000000000..d50b06cbcf
--- /dev/null
+++ b/java/management/eclipse-plugin/src/main/resources/unix/configuration/config.ini
@@ -0,0 +1,26 @@
+###############################################################################
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+###############################################################################
+
+#Product Runtime Configuration File
+
+osgi.splashPath=platform:/base/plugins/org.apache.qpid.management.ui
+eclipse.product=org.apache.qpid.management.ui.product
+eclipse.application=org.apache.qpid.management.ui.application
+osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.core.runtime@start,com.ibm.icu,org.apache.qpid.management.ui,org.eclipse.core.commands,org.eclipse.core.contenttype,org.eclipse.core.expressions,org.eclipse.core.jobs,org.eclipse.core.runtime.compatibility.auth,org.eclipse.core.runtime.compatibility.registry,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.help,org.eclipse.jface,org.eclipse.swt,org.eclipse.swt.motif.linux.x86,org.eclipse.swt.gtk.linux.x86_64,org.eclipse.swt.gtk.linux.x86,org.eclipse.swt.gtk.linux.ppc,org.eclipse.swt.motif.hpux.PA_RISC,org.eclipse.swt.gtk.solaris.sparc,org.eclipse.swt.motif.solaris.sparc,org.eclipse.swt.carbon.macocx,org.eclipse.ui,org.eclipse.ui.forms,org.eclipse.ui.workbench
+osgi.bundles.defaultStartLevel=4
diff --git a/java/management/eclipse-plugin/configuration/config.ini b/java/management/eclipse-plugin/src/main/resources/win32/configuration/config.ini
index a0c5d002b0..dbe3f23fe9 100644
--- a/java/management/eclipse-plugin/configuration/config.ini
+++ b/java/management/eclipse-plugin/src/main/resources/win32/configuration/config.ini
@@ -21,5 +21,6 @@
osgi.splashPath=platform:/base/plugins/org.apache.qpid.management.ui
eclipse.product=org.apache.qpid.management.ui.product
+eclipse.application=org.apache.qpid.management.ui.application
osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.core.runtime@start,com.ibm.icu,org.apache.qpid.management.ui,org.eclipse.core.commands,org.eclipse.core.contenttype,org.eclipse.core.expressions,org.eclipse.core.jobs,org.eclipse.core.runtime.compatibility.auth,org.eclipse.core.runtime.compatibility.registry,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.help,org.eclipse.jface,org.eclipse.swt,org.eclipse.swt.win32.win32.x86,org.eclipse.ui,org.eclipse.ui.forms,org.eclipse.ui.workbench
osgi.bundles.defaultStartLevel=4
diff --git a/java/management/eclipse-plugin/configuration/org.eclipse.osgi/bundles/16/1/.cp/swt-win32-3232.dll b/java/management/eclipse-plugin/src/main/resources/win32/configuration/org.eclipse.osgi/bundles/16/1/.cp/swt-win32-3232.dll
index f028cec28d..f028cec28d 100644
--- a/java/management/eclipse-plugin/configuration/org.eclipse.osgi/bundles/16/1/.cp/swt-win32-3232.dll
+++ b/java/management/eclipse-plugin/src/main/resources/win32/configuration/org.eclipse.osgi/bundles/16/1/.cp/swt-win32-3232.dll
Binary files differ
diff --git a/java/pom.xml b/java/pom.xml
index 5703ded592..e18799b960 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -226,13 +226,9 @@
<!--downloadSources>true</downloadSources-->
<buildcommands>
<java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String>
- <java.lang.String>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</java.lang.String>
- <java.lang.String>net.sourceforge.pmd.runtime.pmdBuilder</java.lang.String>
</buildcommands>
<projectnatures>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
- <nature>net.sourceforge.pmd.runtime.pmdNature</nature>
</projectnatures>
</configuration>
</plugin>
@@ -402,23 +398,6 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>${javadoc.version}</version>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <configuration>
- <configLocation>${basedir}/${topDirectoryLocation}/checkstyle.xml</configLocation>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- <configuration>
- <targetJdk>${java.source.version}</targetJdk>
- <rulesets>
- <ruleset>${basedir}/.ruleset</ruleset>
- </rulesets>
- </configuration>
- </plugin>
</plugins>
</reporting>
@@ -458,36 +437,6 @@
</profile>
<profile>
- <!-- default profile enables checkstyle and Xlint stuff -->
- <id>sourcecheck</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- <showDeprecation>false</showDeprecation>
- <compilerArgument>${compile.flags}</compilerArgument>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
<id>setup.eclipse</id>
<build>
<defaultGoal>process-test-sources</defaultGoal>
@@ -515,109 +464,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>${antrun.version}</version>
- <dependencies>
- <dependency>
- <groupId>ant</groupId>
- <artifactId>ant-nodeps</artifactId>
- <version>1.6.5</version>
- </dependency>
- <dependency>
- <groupId>ant</groupId>
- <artifactId>ant-trax</artifactId>
- <version>1.6.5</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>setup.workspace</id>
- <phase>validate</phase>
- <configuration>
- <tasks>
- <path id="ecp.ws.path" location="${eclipse.workspace.dir}"/>
- <property name="full.eclipse.workspace" refid="ecp.ws.path"/>
-
- <mkdir dir="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings"/>
- <mkdir dir="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle"/>
- <mkdir dir="${full.eclipse.workspace}/.metadata/.plugins/net.sourceforge.pmd.eclipse"/>
- <copy file="${basedir}/${topDirectoryLocation}/checkstyle.xml"
- tofile="${full.eclipse.workspace}/qpid-checkstyle.xml"/>
- <copy file="${basedir}/${topDirectoryLocation}/etc/apache-header.txt"
- tofile="${full.eclipse.workspace}/apache-header.txt"/>
-
- <!-- Add checkstyle config -->
- <copy file="${basedir}/${topDirectoryLocation}/etc/eclipse/template.checkstyle-config.xml"
- tofile="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml"
- overwrite="no">
- <filterset>
- <filter token="CHECKSTYLE_CONFIG_FILE"
- value="${full.eclipse.workspace}/qpid-checkstyle.xml"/>
- <filter token="APACHE_HEADER_FILE"
- value="${full.eclipse.workspace}/apache-header.txt"/>
- </filterset>
- </copy>
-
- <xslt style="${basedir}/${topDirectoryLocation}/etc/eclipse/addcheckstyle.xsl"
- in="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml"
- out="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml.new">
- <param name="checkstyleconfig"
- expression="${full.eclipse.workspace}/qpid-checkstyle.xml"/>
- </xslt>
- <copy
- file="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml.new"
- tofile="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml"
- overwrite="yes"/>
-
-
- <!-- Add warning flags that we want -->
- <propertyfile
- file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs">
- <entry key="org.eclipse.jdt.core.compiler.problem.missingSerialVersion"
- value="ignore"/>
- <entry key="org.eclipse.jdt.core.compiler.problem.unusedImport"
- value="ignore"/>
- <entry key="org.eclipse.jdt.core.compiler.problem.annotationSuperInterface"
- value="ignore"/>
- </propertyfile>
-
-
- <!-- Add code format rules -->
- <concat destfile="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs"
- append="true" fixlastline="true">
- <filelist dir="${basedir}/${topDirectoryLocation}/etc/eclipse"
- files="org.eclipse.jdt.core.prefs"/>
- </concat>
- <loadfile property="eclipse.code.format"
- srcFile="${basedir}/${topDirectoryLocation}/etc/eclipse/QpidCodeFormatter.xml"/>
- <loadfile property="eclipse.code.templates"
- srcFile="${basedir}/${topDirectoryLocation}/etc/eclipse/codetemplates.xml"/>
- <propertyfile
- file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs">
- <entry key="formatter_profile" value="_Qpid Java Conventions"/>
- <entry key="org.eclipse.jdt.ui.formatterprofiles"
- value="${eclipse.code.format}"/>
- <entry key="org.eclipse.jdt.ui.text.custom_code_templates"
- value="${eclipse.code.templates}"/>
-
- <!-- Add import order -->
- <entry key="org.eclipse.jdt.ui.importorder"
- value="java;javax;org.w3c;org.xml;junit;com;org;"/>
- <!-- Sort order -->
- <entry key="org.eclipse.jdt.ui.visibility.order" value="B,R,D,V,"/>
- <entry key="outlinesortoption" value="T,SF,F,SI,I,C,SM,M,"/>
- <entry key="org.eclipse.jdt.ui.enable.visibility.order" value="true"/>
- </propertyfile>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/java/systests/pom.xml b/java/systests/pom.xml
index bf0afa7eef..93c8a2333b 100644
--- a/java/systests/pom.xml
+++ b/java/systests/pom.xml
@@ -84,16 +84,6 @@
<value>file:///${basedir}/src/test/java/log4j.properties</value>
</property>
</systemProperties>
- <includes>
- <include>**/server/**/*Test.java</include>
- <include>**/test/unit/ack/DisconnectAndRedeliver.java</include>
- </includes>
- <excludes>
- <exclude>**/Abstract*Test*</exclude>
- <exclude>**/*PerfTest*</exclude>
- <exclude>**/*PerformanceTest*</exclude>
- <exclude>**/server/util/ConcurrentTest.java</exclude>
- </excludes>
</configuration>
</plugin>
</plugins>
diff --git a/java/systests/src/test/java/org/apache/qpid/server/exchange/HeadersExchangePerformanceTest.java b/java/systests/src/old_test/java/org/apache/qpid/server/exchange/HeadersExchangePerformanceTest.java
index ff0d58ad69..ff0d58ad69 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/exchange/HeadersExchangePerformanceTest.java
+++ b/java/systests/src/old_test/java/org/apache/qpid/server/exchange/HeadersExchangePerformanceTest.java
diff --git a/java/systests/src/test/java/org/apache/qpid/server/protocol/TestProtocolInitiation.java b/java/systests/src/old_test/java/org/apache/qpid/server/protocol/TestProtocolInitiation.java
index e76c164f64..e76c164f64 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/protocol/TestProtocolInitiation.java
+++ b/java/systests/src/old_test/java/org/apache/qpid/server/protocol/TestProtocolInitiation.java
diff --git a/java/systests/src/test/java/org/apache/qpid/server/queue/QueueConcurrentPerfTest.java b/java/systests/src/old_test/java/org/apache/qpid/server/queue/QueueConcurrentPerfTest.java
index 11c0026455..11c0026455 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/queue/QueueConcurrentPerfTest.java
+++ b/java/systests/src/old_test/java/org/apache/qpid/server/queue/QueueConcurrentPerfTest.java
diff --git a/java/systests/src/test/java/org/apache/qpid/server/queue/QueuePerfTest.java b/java/systests/src/old_test/java/org/apache/qpid/server/queue/QueuePerfTest.java
index 5b3857396d..5b3857396d 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/queue/QueuePerfTest.java
+++ b/java/systests/src/old_test/java/org/apache/qpid/server/queue/QueuePerfTest.java
diff --git a/java/systests/src/test/java/org/apache/qpid/server/queue/SendPerfTest.java b/java/systests/src/old_test/java/org/apache/qpid/server/queue/SendPerfTest.java
index 44cedf5d7d..6490b9f270 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/queue/SendPerfTest.java
+++ b/java/systests/src/old_test/java/org/apache/qpid/server/queue/SendPerfTest.java
@@ -90,8 +90,7 @@ public class SendPerfTest extends TimedRun
/**
* Delivers messages to a number of queues.
- *
- * @param count the number of messages to deliver
+ * @param count the number of messages to deliver
* @param queues the list of queues
* @throws NoConsumersException
*/
@@ -122,7 +121,7 @@ public class SendPerfTest extends TimedRun
q.bind("routingKey", exchange);
try
{
- q.registerProtocolSession(createSession(), 1, "1", false, null);
+ q.registerProtocolSession(createSession(), 1, "1", false);
}
catch (Exception e)
{
@@ -136,7 +135,7 @@ public class SendPerfTest extends TimedRun
static AMQQueue createQueue(String name) throws AMQException
{
return new AMQQueue(name, false, null, false, ApplicationRegistry.getInstance().getQueueRegistry(),
- new OnCurrentThreadExecutor());
+ new OnCurrentThreadExecutor());
}
static AMQProtocolSession createSession() throws Exception
diff --git a/java/systests/src/test/java/org/apache/qpid/server/util/ConcurrentTest.java b/java/systests/src/old_test/java/org/apache/qpid/server/util/ConcurrentTest.java
index 1ae8d3205d..1ae8d3205d 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/util/ConcurrentTest.java
+++ b/java/systests/src/old_test/java/org/apache/qpid/server/util/ConcurrentTest.java
diff --git a/java/systests/src/test/java/org/apache/qpid/test/unit/ack/DisconnectAndRedeliverTest.java b/java/systests/src/old_test/java/org/apache/qpid/test/unit/ack/DisconnectAndRedeliverTest.java
index a3e555aac9..a3e555aac9 100644
--- a/java/systests/src/test/java/org/apache/qpid/test/unit/ack/DisconnectAndRedeliverTest.java
+++ b/java/systests/src/old_test/java/org/apache/qpid/test/unit/ack/DisconnectAndRedeliverTest.java
diff --git a/java/systests/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTest.java b/java/systests/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java
index a7611df55d..35aab78f73 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTest.java
+++ b/java/systests/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java
@@ -40,7 +40,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
-public class AbstractHeadersExchangeTest extends TestCase
+public class AbstractHeadersExchangeTestBase extends TestCase
{
private final HeadersExchange exchange = new HeadersExchange();
protected final Set<TestQueue> queues = new HashSet<TestQueue>();
@@ -81,25 +81,45 @@ public class AbstractHeadersExchangeTest extends TestCase
protected void routeAndTest(Message m, TestQueue... expected) throws AMQException
{
- routeAndTest(m, Arrays.asList(expected));
+ routeAndTest(m, false, Arrays.asList(expected));
+ }
+
+ protected void routeAndTest(Message m, boolean expectReturn, TestQueue... expected) throws AMQException
+ {
+ routeAndTest(m, expectReturn, Arrays.asList(expected));
}
protected void routeAndTest(Message m, List<TestQueue> expected) throws AMQException
{
- route(m);
- for (TestQueue q : queues)
+ routeAndTest(m, false, expected);
+ }
+
+ protected void routeAndTest(Message m, boolean expectReturn, List<TestQueue> expected) throws AMQException
+ {
+ try
{
- if (expected.contains(q))
+ route(m);
+ assertFalse("Expected "+m+" to be returned due to manadatory flag, and lack of routing",expectReturn);
+ for (TestQueue q : queues)
{
- assertTrue("Expected " + m + " to be delivered to " + q, m.isInQueue(q));
- //assert m.isInQueue(q) : "Expected " + m + " to be delivered to " + q;
- }
- else
- {
- assertFalse("Did not expect " + m + " to be delivered to " + q, m.isInQueue(q));
- //assert !m.isInQueue(q) : "Did not expect " + m + " to be delivered to " + q;
+ if (expected.contains(q))
+ {
+ assertTrue("Expected " + m + " to be delivered to " + q, m.isInQueue(q));
+ //assert m.isInQueue(q) : "Expected " + m + " to be delivered to " + q;
+ }
+ else
+ {
+ assertFalse("Did not expect " + m + " to be delivered to " + q, m.isInQueue(q));
+ //assert !m.isInQueue(q) : "Did not expect " + m + " to be delivered to " + q;
+ }
}
}
+
+ catch (NoRouteException ex)
+ {
+ assertTrue("Expected "+m+" not to be returned",expectReturn);
+ }
+
}
static FieldTable getHeaders(String... entries)
diff --git a/java/systests/src/test/java/org/apache/qpid/server/exchange/HeadersExchangeTest.java b/java/systests/src/test/java/org/apache/qpid/server/exchange/HeadersExchangeTest.java
index 1c80e521ca..c220442a78 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/exchange/HeadersExchangeTest.java
+++ b/java/systests/src/test/java/org/apache/qpid/server/exchange/HeadersExchangeTest.java
@@ -23,8 +23,9 @@ package org.apache.qpid.server.exchange;
import org.apache.qpid.AMQException;
import org.apache.qpid.server.registry.ApplicationRegistry;
import org.apache.qpid.server.util.TestApplicationRegistry;
+import org.apache.qpid.framing.BasicPublishBody;
-public class HeadersExchangeTest extends AbstractHeadersExchangeTest
+public class HeadersExchangeTest extends AbstractHeadersExchangeTestBase
{
protected void setUp() throws Exception
{
@@ -52,6 +53,19 @@ public class HeadersExchangeTest extends AbstractHeadersExchangeTest
routeAndTest(new Message("Message5", "F0000=Aardvark", "F0001=Bear"),
q1, q2, q3, q4, q5, q6, q7, q8);
routeAndTest(new Message("Message6", "F0002"));
+
+ Message m7 = new Message("Message7", "XXXXX");
+
+ BasicPublishBody pb7 = m7.getPublishBody();
+ pb7.mandatory = true;
+ routeAndTest(m7,true);
+
+ Message m8 = new Message("Message8", "F0000");
+ BasicPublishBody pb8 = m8.getPublishBody();
+ pb8.mandatory = true;
+ routeAndTest(m8,false,q1);
+
+
}
public void testAny() throws AMQException
@@ -71,6 +85,20 @@ public class HeadersExchangeTest extends AbstractHeadersExchangeTest
routeAndTest(new Message("Message6", "F0002"));
}
+ public void testMandatory() throws AMQException
+ {
+ TestQueue q1 = bindDefault("F0000");
+ Message m1 = new Message("Message1", "XXXXX");
+ Message m2 = new Message("Message2", "F0000");
+ BasicPublishBody pb1 = m1.getPublishBody();
+ pb1.mandatory = true;
+ BasicPublishBody pb2 = m1.getPublishBody();
+ pb2.mandatory = true;
+ routeAndTest(m1,true);
+
+
+ }
+
public static junit.framework.Test suite()
{
return new junit.framework.TestSuite(HeadersExchangeTest.class);
diff --git a/java/systests/src/test/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java b/java/systests/src/test/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java
new file mode 100644
index 0000000000..4dffe3e75f
--- /dev/null
+++ b/java/systests/src/test/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java
@@ -0,0 +1,151 @@
+package org.apache.qpid.server.exchange;
+
+import junit.framework.TestCase;
+import org.apache.log4j.Logger;
+import org.apache.qpid.test.VMBrokerSetup;
+import org.apache.qpid.server.registry.ApplicationRegistry;
+import org.apache.qpid.server.util.TestApplicationRegistry;
+import org.apache.qpid.server.store.TestableMemoryMessageStore;
+import org.apache.qpid.client.*;
+import org.apache.qpid.url.AMQBindingURL;
+import org.apache.qpid.url.BindingURL;
+import org.apache.qpid.exchange.ExchangeDefaults;
+import org.apache.qpid.framing.FieldTable;
+import org.apache.qpid.framing.PropertyFieldTable;
+
+import javax.jms.*;
+import java.util.List;
+import java.util.Collections;
+import java.util.ArrayList;
+
+public class ReturnUnroutableMandatoryMessageTest extends TestCase implements ExceptionListener
+{
+ private static final Logger _logger = Logger.getLogger(ReturnUnroutableMandatoryMessageTest.class);
+
+ private final List<Message> _bouncedMessageList = Collections.synchronizedList(new ArrayList<Message>());
+
+ static
+ {
+ String workdir = System.getProperty("QPID_WORK");
+ if (workdir == null || workdir.equals(""))
+ {
+ String tempdir = System.getProperty("java.io.tmpdir");
+ System.out.println("QPID_WORK not set using tmp directory: " + tempdir);
+ System.setProperty("QPID_WORK", tempdir);
+ }
+// DOMConfigurator.configure("../broker/etc/log4j.xml");
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ ApplicationRegistry.initialise(new TestApplicationRegistry(), 1);
+ }
+
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ /**
+ * Tests that mandatory message which are not routable are returned to the producer
+ *
+ * @throws Exception
+ */
+ public void testReturnUnroutableMandatoryMessage() throws Exception
+ {
+ _bouncedMessageList.clear();
+ Connection con = new AMQConnection("vm://:1", "guest", "guest", "consumer1", "/test");
+
+ TestableMemoryMessageStore store = (TestableMemoryMessageStore) ApplicationRegistry.getInstance().getMessageStore();
+
+ AMQSession consumerSession = (AMQSession) con.createSession(false, Session.CLIENT_ACKNOWLEDGE);
+
+
+ AMQHeadersExchange queue = new AMQHeadersExchange(new AMQBindingURL(ExchangeDefaults.HEADERS_EXCHANGE_CLASS+"://"+ExchangeDefaults.HEADERS_EXCHANGE_NAME+"/test/queue1?"+ BindingURL.OPTION_ROUTING_KEY+"='F0000=1'"));
+ FieldTable ft = new PropertyFieldTable();
+ ft.setString("F1000","1");
+ MessageConsumer consumer = consumerSession.createConsumer(queue, AMQSession.DEFAULT_PREFETCH_LOW_MARK, AMQSession.DEFAULT_PREFETCH_HIGH_MARK, false, false, (String)null, ft);
+
+
+ //force synch to ensure the consumer has resulted in a bound queue
+ ((AMQSession) consumerSession).declareExchangeSynch(ExchangeDefaults.HEADERS_EXCHANGE_NAME, ExchangeDefaults.HEADERS_EXCHANGE_CLASS);
+
+ Connection con2 = new AMQConnection("vm://:1", "guest", "guest", "producer1", "/test");
+
+ con2.setExceptionListener(this);
+ AMQSession producerSession = (AMQSession) con2.createSession(false, Session.CLIENT_ACKNOWLEDGE);
+
+ // Need to start the "producer" connection in order to receive bounced messages
+ _logger.info("Starting producer connection");
+ con2.start();
+
+
+ MessageProducer nonMandatoryProducer = producerSession.createProducer(queue,false,false);
+ MessageProducer mandatoryProducer = producerSession.createProducer(queue);
+
+
+ // First test - should neither be bounced nor routed
+ _logger.info("Sending non-routable non-mandatory message");
+ TextMessage msg1 = producerSession.createTextMessage("msg1");
+ nonMandatoryProducer.send(msg1);
+
+ // Second test - should be bounced
+ _logger.info("Sending non-routable mandatory message");
+ TextMessage msg2 = producerSession.createTextMessage("msg2");
+ mandatoryProducer.send(msg2);
+
+ // Third test - should be routed
+ _logger.info("Sending routable message");
+ TextMessage msg3 = producerSession.createTextMessage("msg3");
+ msg3.setStringProperty("F1000","1");
+ mandatoryProducer.send(msg3);
+
+
+
+ _logger.info("Starting consumer connection");
+ con.start();
+ TextMessage tm = (TextMessage) consumer.receive(1000L);
+
+ assertTrue("No message routed to receiver",tm != null);
+ assertTrue("Wrong message routed to receiver: "+tm.getText(),"msg3".equals(tm.getText()));
+
+ try
+ {
+ Thread.sleep(1000L);
+ }
+ catch(InterruptedException e)
+ {
+ ;
+ }
+
+ assertTrue("Wrong number of messages bounced (expect 1): "+_bouncedMessageList.size(),_bouncedMessageList.size()==1);
+ Message m = _bouncedMessageList.get(0);
+ assertTrue("Wrong message bounced: "+m.toString(),m.toString().contains("msg2"));
+
+
+
+
+ con.close();
+ con2.close();
+
+
+ }
+
+ public static junit.framework.Test suite()
+ {
+ return new VMBrokerSetup(new junit.framework.TestSuite(ReturnUnroutableMandatoryMessageTest.class));
+ }
+
+ public void onException(JMSException jmsException)
+ {
+ _logger.warn("Caught exception on producer: ",jmsException);
+ Exception linkedException = jmsException.getLinkedException();
+ if(linkedException instanceof AMQNoRouteException)
+ {
+ AMQNoRouteException noRoute = (AMQNoRouteException) linkedException;
+ Message bounced = (Message) noRoute.getUndeliveredMessage();
+ _bouncedMessageList.add(bounced);
+ }
+ }
+}
diff --git a/java/systests/src/test/java/org/apache/qpid/server/queue/ConcurrencyTest.java b/java/systests/src/test/java/org/apache/qpid/server/queue/ConcurrencyTest.java
index a76db6a728..fe8960c872 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/queue/ConcurrencyTest.java
+++ b/java/systests/src/test/java/org/apache/qpid/server/queue/ConcurrencyTest.java
@@ -36,7 +36,7 @@ public class ConcurrencyTest extends MessageTestHelper
private final int numMessages = 1000;
- private final List<TestSubscription> _subscribers = new ArrayList<TestSubscription>();
+ private final List<SubscriptionTestHelper> _subscribers = new ArrayList<SubscriptionTestHelper>();
private final Set<Subscription> _active = new HashSet<Subscription>();
private final List<AMQMessage> _messages = new ArrayList<AMQMessage>();
private int next = 0;//index to next message to send
@@ -91,7 +91,7 @@ public class ConcurrencyTest extends MessageTestHelper
{
for(int i = 0; i < subscriptions; i++)
{
- _subscribers.add(new TestSubscription("Subscriber" + i, _received));
+ _subscribers.add(new SubscriptionTestHelper("Subscriber" + i, _received));
}
}
@@ -174,7 +174,7 @@ public class ConcurrencyTest extends MessageTestHelper
return random.nextBoolean();
}
- private TestSubscription randomSubscriber()
+ private SubscriptionTestHelper randomSubscriber()
{
return _subscribers.get(random.nextInt(_subscribers.size()));
}
diff --git a/java/systests/src/test/java/org/apache/qpid/server/queue/DeliveryManagerTest.java b/java/systests/src/test/java/org/apache/qpid/server/queue/DeliveryManagerTest.java
index 9cfd9458d1..3631264e5a 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/queue/DeliveryManagerTest.java
+++ b/java/systests/src/test/java/org/apache/qpid/server/queue/DeliveryManagerTest.java
@@ -48,8 +48,8 @@ abstract public class DeliveryManagerTest extends MessageTestHelper
_mgr.deliver("Me", messages[i]);
}
- TestSubscription s1 = new TestSubscription("1");
- TestSubscription s2 = new TestSubscription("2");
+ SubscriptionTestHelper s1 = new SubscriptionTestHelper("1");
+ SubscriptionTestHelper s2 = new SubscriptionTestHelper("2");
_subscriptions.addSubscriber(s1);
_subscriptions.addSubscriber(s2);
@@ -88,7 +88,7 @@ abstract public class DeliveryManagerTest extends MessageTestHelper
}
int batch = messages.length / 2;
- TestSubscription s1 = new TestSubscription("1");
+ SubscriptionTestHelper s1 = new SubscriptionTestHelper("1");
_subscriptions.addSubscriber(s1);
for (int i = 0; i < batch; i++)
@@ -147,7 +147,7 @@ abstract public class DeliveryManagerTest extends MessageTestHelper
{
try
{
- TestSubscription s = new TestSubscription("A");
+ SubscriptionTestHelper s = new SubscriptionTestHelper("A");
_subscriptions.addSubscriber(s);
s.setSuspended(true);
AMQMessage msg = message(true);
diff --git a/java/systests/src/test/java/org/apache/qpid/server/queue/SubscriptionManagerTest.java b/java/systests/src/test/java/org/apache/qpid/server/queue/SubscriptionManagerTest.java
index f8db90850f..d3ec3c11d4 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/queue/SubscriptionManagerTest.java
+++ b/java/systests/src/test/java/org/apache/qpid/server/queue/SubscriptionManagerTest.java
@@ -30,12 +30,12 @@ public class SubscriptionManagerTest extends TestCase
{
assertTrue(mgr.isEmpty());
assertFalse(mgr.hasActiveSubscribers());
- TestSubscription s1 = new TestSubscription("S1");
+ SubscriptionTestHelper s1 = new SubscriptionTestHelper("S1");
mgr.addSubscriber(s1);
assertFalse(mgr.isEmpty());
assertTrue(mgr.hasActiveSubscribers());
- TestSubscription s2 = new TestSubscription("S2");
+ SubscriptionTestHelper s2 = new SubscriptionTestHelper("S2");
mgr.addSubscriber(s2);
s2.setSuspended(true);
@@ -47,18 +47,18 @@ public class SubscriptionManagerTest extends TestCase
s1.setSuspended(true);
assertFalse(mgr.hasActiveSubscribers());
- mgr.removeSubscriber(new TestSubscription("S1"));
+ mgr.removeSubscriber(new SubscriptionTestHelper("S1"));
assertFalse(mgr.isEmpty());
- mgr.removeSubscriber(new TestSubscription("S2"));
+ mgr.removeSubscriber(new SubscriptionTestHelper("S2"));
assertTrue(mgr.isEmpty());
}
public void testRoundRobin()
{
- TestSubscription a = new TestSubscription("A");
- TestSubscription b = new TestSubscription("B");
- TestSubscription c = new TestSubscription("C");
- TestSubscription d = new TestSubscription("D");
+ SubscriptionTestHelper a = new SubscriptionTestHelper("A");
+ SubscriptionTestHelper b = new SubscriptionTestHelper("B");
+ SubscriptionTestHelper c = new SubscriptionTestHelper("C");
+ SubscriptionTestHelper d = new SubscriptionTestHelper("D");
mgr.addSubscriber(a);
mgr.addSubscriber(b);
mgr.addSubscriber(c);
@@ -84,7 +84,7 @@ public class SubscriptionManagerTest extends TestCase
mgr.removeSubscriber(a);
d.setSuspended(true);
c.setSuspended(false);
- Subscription e = new TestSubscription("D");
+ Subscription e = new SubscriptionTestHelper("D");
mgr.addSubscriber(e);
for (int i = 0; i < 3; i++)
diff --git a/java/systests/src/test/java/org/apache/qpid/server/queue/SubscriptionSetTest.java b/java/systests/src/test/java/org/apache/qpid/server/queue/SubscriptionSetTest.java
index 4969b5589a..bcf54693d3 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/queue/SubscriptionSetTest.java
+++ b/java/systests/src/test/java/org/apache/qpid/server/queue/SubscriptionSetTest.java
@@ -47,13 +47,13 @@ public class SubscriptionSetTest extends TestCase
}
}
- final TestSubscription sub1 = new TestSubscription("1");
- final TestSubscription sub2 = new TestSubscription("2");
- final TestSubscription sub3 = new TestSubscription("3");
+ final SubscriptionTestHelper sub1 = new SubscriptionTestHelper("1");
+ final SubscriptionTestHelper sub2 = new SubscriptionTestHelper("2");
+ final SubscriptionTestHelper sub3 = new SubscriptionTestHelper("3");
- final TestSubscription suspendedSub1 = new TestSubscription("sus1", true);
- final TestSubscription suspendedSub2 = new TestSubscription("sus2", true);
- final TestSubscription suspendedSub3 = new TestSubscription("sus3", true);
+ final SubscriptionTestHelper suspendedSub1 = new SubscriptionTestHelper("sus1", true);
+ final SubscriptionTestHelper suspendedSub2 = new SubscriptionTestHelper("sus2", true);
+ final SubscriptionTestHelper suspendedSub3 = new SubscriptionTestHelper("sus3", true);
public void testNextMessage()
{
@@ -114,7 +114,7 @@ public class SubscriptionSetTest extends TestCase
public void testNextMessageOverScanning()
{
TestSubscriptionSet ss = new TestSubscriptionSet();
- TestSubscription sub = new TestSubscription("test");
+ SubscriptionTestHelper sub = new SubscriptionTestHelper("test");
ss.addSubscriber(suspendedSub1);
ss.addSubscriber(sub);
ss.addSubscriber(suspendedSub3);
diff --git a/java/systests/src/test/java/org/apache/qpid/server/queue/TestSubscription.java b/java/systests/src/test/java/org/apache/qpid/server/queue/SubscriptionTestHelper.java
index 74894e7822..2de22f9084 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/queue/TestSubscription.java
+++ b/java/systests/src/test/java/org/apache/qpid/server/queue/SubscriptionTestHelper.java
@@ -24,24 +24,24 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Queue;
-public class TestSubscription implements Subscription
+public class SubscriptionTestHelper implements Subscription
{
private final List<AMQMessage> messages;
private final Object key;
private boolean isSuspended;
- public TestSubscription(Object key)
+ public SubscriptionTestHelper(Object key)
{
this(key, new ArrayList<AMQMessage>());
}
- public TestSubscription(final Object key, final boolean isSuspended)
+ public SubscriptionTestHelper(final Object key, final boolean isSuspended)
{
this(key);
setSuspended(isSuspended);
}
- TestSubscription(Object key, List<AMQMessage> messages)
+ SubscriptionTestHelper(Object key, List<AMQMessage> messages)
{
this.key = key;
this.messages = messages;
@@ -88,7 +88,7 @@ public class TestSubscription implements Subscription
public void enqueueForPreDelivery(AMQMessage msg)
{
- //no-op -- if selectors are implemented here then look at SubscriptionImpl
+ //no-op
}
public int hashCode()
@@ -98,7 +98,7 @@ public class TestSubscription implements Subscription
public boolean equals(Object o)
{
- return o instanceof TestSubscription && ((TestSubscription) o).key.equals(key);
+ return o instanceof SubscriptionTestHelper && ((SubscriptionTestHelper) o).key.equals(key);
}
public String toString()
diff --git a/java/systests/src/test/java/org/apache/qpid/server/queue/SynchronizedDeliveryManagerTest.java b/java/systests/src/test/java/org/apache/qpid/server/queue/SynchronizedDeliveryManagerTest.java
index ebe8e192a0..b49166d1ce 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/queue/SynchronizedDeliveryManagerTest.java
+++ b/java/systests/src/test/java/org/apache/qpid/server/queue/SynchronizedDeliveryManagerTest.java
@@ -23,6 +23,7 @@ package org.apache.qpid.server.queue;
import org.apache.qpid.server.queue.SynchronizedDeliveryManager;
import org.apache.qpid.server.queue.AMQQueue;
import org.apache.qpid.server.queue.DefaultQueueRegistry;
+import org.apache.qpid.server.queue.ConcurrentDeliveryManager;
import org.apache.qpid.server.queue.DeliveryManagerTest;
import org.apache.qpid.AMQException;