diff options
29 files changed, 344 insertions, 332 deletions
diff --git a/java/broker/etc/config.xml b/java/broker/etc/config.xml index c66c2f632e..b5b81bbeb0 100644 --- a/java/broker/etc/config.xml +++ b/java/broker/etc/config.xml @@ -42,7 +42,7 @@ <management> <enabled>true</enabled> <jmxport>8999</jmxport> - <security-enabled>true</security-enabled> + <security-enabled>false</security-enabled> </management> <advanced> <filterchain enableExecutorPool="true"/> diff --git a/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java b/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java index 97c95dae5e..918b5fc176 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java +++ b/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java @@ -431,24 +431,20 @@ public class AMQChannel */ public void requeue() throws AMQException { - if (_log.isInfoEnabled()) - { - _log.info("Requeuing for " + toString()); - } - // we must create a new map since all the messages will get a new delivery tag when they are redelivered Collection<UnacknowledgedMessage> messagesToBeDelivered = _unacknowledgedMessageMap.cancelAllMessages(); - if (_log.isDebugEnabled()) - { - _log.info("Requeuing " + messagesToBeDelivered.size() + " unacked messages."); - } // Deliver these messages out of the transaction as their delivery was never // part of the transaction only the receive. TransactionalContext deliveryContext = null; if (!messagesToBeDelivered.isEmpty()) { + if (_log.isInfoEnabled()) + { + _log.info("Requeuing " + messagesToBeDelivered.size() + " unacked messages. for " + toString()); + } + if (!(_txnContext instanceof NonTransactionalContext)) { // if (_nonTransactedContext == null) diff --git a/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionStartOkMethodHandler.java b/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionStartOkMethodHandler.java index 4734143497..29d6c26b66 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionStartOkMethodHandler.java +++ b/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionStartOkMethodHandler.java @@ -30,6 +30,7 @@ import org.apache.qpid.framing.AMQFrame; import org.apache.qpid.framing.ConnectionSecureBody; import org.apache.qpid.framing.ConnectionStartOkBody; import org.apache.qpid.framing.ConnectionTuneBody; +import org.apache.qpid.framing.ConnectionCloseBody; import org.apache.qpid.protocol.AMQMethodEvent; import org.apache.qpid.protocol.AMQConstant; import org.apache.qpid.server.protocol.AMQProtocolSession; @@ -93,10 +94,24 @@ public class ConnectionStartOkMethodHandler implements StateAwareMethodListener< switch (authResult.status) { case ERROR: - throw new AMQException("Authentication failed"); + _logger.info("Authentication failed"); + stateManager.changeState(AMQState.CONNECTION_CLOSING); + // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0) + // TODO: Connect this to the session version obtained from ProtocolInitiation for this session. + // Be aware of possible changes to parameter order as versions change. + AMQFrame close = ConnectionCloseBody.createAMQFrame(0, + (byte) 8, (byte) 0, // AMQP version (major, minor) + ConnectionCloseBody.getClazz((byte) 8, (byte) 0), // classId + ConnectionCloseBody.getMethod((byte) 8, (byte) 0), // methodId + AMQConstant.NOT_ALLOWED.getCode(), // replyCode + AMQConstant.NOT_ALLOWED.getName()); // replyText + session.writeFrame(close); + disposeSaslServer(session); + break; + case SUCCESS: _logger.info("Connected as: " + ss.getAuthorizationID()); - session.setAuthorizedID(new UsernamePrincipal(ss.getAuthorizationID())); + session.setAuthorizedID(new UsernamePrincipal(ss.getAuthorizationID())); stateManager.changeState(AMQState.CONNECTION_NOT_TUNED); // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0) diff --git a/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java b/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java index a14d4214e3..f277398b50 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java +++ b/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java @@ -94,7 +94,7 @@ public class JMXManagedObjectRegistry implements ManagedObjectRegistry IApplicationRegistry appRegistry = ApplicationRegistry.getInstance(); - boolean security = appRegistry.getConfiguration().getBoolean("management.security-enabled", true); + boolean security = appRegistry.getConfiguration().getBoolean("management.security-enabled", false); int port = appRegistry.getConfiguration().getInt("management.jmxport", 8999); if (security) diff --git a/java/distribution/src/main/assembly/management-eclipse-plugin.xml b/java/distribution/src/main/assembly/management-eclipse-plugin.xml index 98534d43d0..826128b42f 100644 --- a/java/distribution/src/main/assembly/management-eclipse-plugin.xml +++ b/java/distribution/src/main/assembly/management-eclipse-plugin.xml @@ -90,7 +90,7 @@ </fileSet> <fileSet> <directory>../management/eclipse-plugin/src/main/resources/sasl</directory> - <outputDirectory>qpidmc/eclipse/plugins/jmxremote.optional_1.0.1/META-INF</outputDirectory> + <outputDirectory>qpidmc/eclipse/plugins/jmxremote.sasl_1.0.1/META-INF</outputDirectory> <includes> <include>MANIFEST.MF</include> </includes> diff --git a/java/management/eclipse-plugin/META-INF/MANIFEST.MF b/java/management/eclipse-plugin/META-INF/MANIFEST.MF index a92f375886..a03c35c457 100644 --- a/java/management/eclipse-plugin/META-INF/MANIFEST.MF +++ b/java/management/eclipse-plugin/META-INF/MANIFEST.MF @@ -8,6 +8,6 @@ Bundle-Localization: plugin Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.ui.forms, - jmxremote.optional + jmxremote.sasl Eclipse-LazyStart: true Bundle-Vendor: Apache Software Foundation diff --git a/java/management/eclipse-plugin/plugin.xml b/java/management/eclipse-plugin/plugin.xml index bd7ae0a474..5774859b47 100644 --- a/java/management/eclipse-plugin/plugin.xml +++ b/java/management/eclipse-plugin/plugin.xml @@ -96,6 +96,11 @@ description="pops up the window for editing selected attribute" id="org.apache.qpid.management.ui.actions.cmd_editAttribute" name="Edit Attribute"/> + <command + categoryId="org.apache.qpid.management.ui.category" + description="About Qpid Management Console" + id="qpidmc.about" + name="About"/> </extension> <extension point="org.eclipse.ui.bindings"> @@ -139,16 +144,12 @@ application="org.apache.qpid.management.ui.application" name="Qpid Management Console"> <property - name="about Qpid Management Console" - value="version 0.1.0"> - </property> - <property name="windowImages" value="icons/qpidmc16.gif,icons/qpidmc32.gif"> </property> <property name="aboutText" - value="Qpid Management Console
version 0.1.0"/> + value="Qpid Management Console"/> </product> </extension> <extension diff --git a/java/management/eclipse-plugin/pom.xml b/java/management/eclipse-plugin/pom.xml index c61adde877..152b5e9b1a 100644 --- a/java/management/eclipse-plugin/pom.xml +++ b/java/management/eclipse-plugin/pom.xml @@ -207,6 +207,10 @@ <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationActionBarAdvisor.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationActionBarAdvisor.java index 9015b74f3f..b5c1b5074a 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationActionBarAdvisor.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationActionBarAdvisor.java @@ -20,6 +20,8 @@ */ package org.apache.qpid.management.ui; +import org.apache.qpid.management.ui.actions.VersionAction; +import org.eclipse.jface.action.Action; import org.eclipse.jface.action.GroupMarker; import org.eclipse.jface.action.ICoolBarManager; import org.eclipse.jface.action.IMenuManager; @@ -44,8 +46,7 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor // in the fill methods. This ensures that the actions aren't recreated // when fillActionBars is called with FILL_PROXY. private IWorkbenchAction exitAction; - private IWorkbenchAction aboutAction; - + private Action _aboutAction; public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) { @@ -63,8 +64,8 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor exitAction = ActionFactory.QUIT.create(window); register(exitAction); - aboutAction = ActionFactory.ABOUT.create(window); - register(aboutAction); + _aboutAction = new VersionAction(window); + register(_aboutAction); } @@ -85,8 +86,7 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor fileMenu.add(exitAction); // Help - //aboutAction.setText("about Qpid Management Console"); - helpMenu.add(aboutAction); + helpMenu.add(_aboutAction); } protected void fillCoolBar(ICoolBarManager coolBar) 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 714f84ea49..0693a4fc93 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 @@ -41,8 +41,9 @@ public abstract class ApplicationRegistry { private static ImageRegistry imageRegistry = new ImageRegistry(); private static FontRegistry fontRegistry = new FontRegistry(); - public static final boolean debug = Boolean.getBoolean("debug"); - public static final String securityMechanism = System.getProperty("security", null); + public static final boolean debug = Boolean.getBoolean("eclipse.consoleLog"); + public static final String securityMechanism = System.getProperty("security", null); + public static final String connectorClass = System.getProperty("jmxconnector"); static { @@ -137,4 +138,9 @@ public abstract class ApplicationRegistry { return securityMechanism; } + + public static String getJMXConnectorClass() + { + return connectorClass; + } } diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ICommandIds.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ICommandIds.java deleted file mode 100644 index 12dea649c6..0000000000 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ICommandIds.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * 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. - * - */ -package org.apache.qpid.management.ui; - -/** - * Interface defining the application's command IDs. - * Key bindings can be defined for specific commands. - * To associate an action with a command, use IAction.setActionDefinitionId(commandId). - * - * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String) - */ -public interface ICommandIds -{ - //public static final String CMD_ADD_SERVER = "org.apache.qpid.management.ui.add"; - //public static final String CMD_RECONNECT_SERVER = "org.apache.qpid.management.ui.reconnect"; - //public static final String CMD_DISCONNECT_SERVER = "org.apache.qpid.management.ui.disconnect"; - //public static final String CMD_REFRESH = "org.apache.qpid.management.ui.actions.refresh"; -} diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AbstractAction.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AbstractAction.java index 0101905bbf..f70452dd42 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AbstractAction.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AbstractAction.java @@ -1,3 +1,23 @@ +/* + * + * 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. + * + */ package org.apache.qpid.management.ui.actions; import static org.apache.qpid.management.ui.Constants.ERROR_SERVER_CONNECTION; @@ -6,15 +26,24 @@ import org.apache.qpid.management.ui.ApplicationRegistry; import org.apache.qpid.management.ui.ApplicationWorkbenchAdvisor; import org.apache.qpid.management.ui.Constants; import org.apache.qpid.management.ui.jmx.MBeanUtility; +import org.apache.qpid.management.ui.views.NavigationView; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; +import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.ErrorDialog; +import org.eclipse.jface.viewers.ISelection; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.IWorkbenchWindowActionDelegate; public class AbstractAction { + private NavigationView _navigationView; + protected IWorkbenchWindow _window; + + public static final String RMI_SASL_ERROR = "non-JRMP server"; + public static final String SECURITY_FAILURE = "User authentication has failed"; + public static final String SERVER_UNAVAILABLE = "Qpid server is not running"; /** * We will cache window object in order to @@ -28,9 +57,20 @@ public class AbstractAction { _window.getShell().setImage(ApplicationRegistry.getImage(Constants.CONSOLE_IMAGE)); } + } + + protected NavigationView getNavigationView() + { + if (_navigationView == null) + { + _navigationView = (NavigationView)_window.getActivePage().findView(NavigationView.ID); + } + + return _navigationView; } - protected void handleException(Exception ex, String title, String msg) + + protected void handleException(Throwable ex, String title, String msg) { MBeanUtility.printStackTrace(ex); if (msg == null) @@ -55,4 +95,21 @@ public class AbstractAction IStatus.OK, msg, null); ErrorDialog.openError(_window.getShell(), "Error", title, status); } + + + /** + * Selection in the workbench has been changed. We can change the state of the 'real' action here + * if we want, but this can only happen after the delegate has been created. + * @see IWorkbenchWindowActionDelegate#selectionChanged + */ + public void selectionChanged(IAction action, ISelection selection) { + } + + /** + * We can use this method to dispose of any system resources we previously allocated. + * @see IWorkbenchWindowActionDelegate#dispose + */ + public void dispose() { + + } } diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AddServer.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AddServer.java index ff0f42b49e..c13f54929d 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AddServer.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AddServer.java @@ -22,13 +22,13 @@ package org.apache.qpid.management.ui.actions; import static org.apache.qpid.management.ui.Constants.*; +import java.io.IOException; + import org.apache.qpid.management.ui.ApplicationRegistry; import org.apache.qpid.management.ui.exceptions.InfoRequiredException; -import org.apache.qpid.management.ui.views.NavigationView; import org.apache.qpid.management.ui.views.NumberVerifyListener; import org.apache.qpid.management.ui.views.ViewUtility; import org.eclipse.jface.action.IAction; -import org.eclipse.jface.viewers.ISelection; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; @@ -47,7 +47,6 @@ public class AddServer extends AbstractAction implements IWorkbenchWindowActionD { private static final String[] _domains ={"org.apache.qpid"}; - private NavigationView _navigationView; private String _transport = DEFAULT_PROTOCOL; private String _host; private String _port; @@ -62,19 +61,6 @@ public class AddServer extends AbstractAction implements IWorkbenchWindowActionD } - /* - public AddServer(IWorkbenchWindow window)//, String label) - { - _window = window; - //setText(label); - // The id is used to refer to the action in a menu or toolbar - setId(ICommandIds.CMD_ADD_SERVER); - // Associate the action with a pre-defined command, to allow key bindings. - setActionDefinitionId(ICommandIds.CMD_ADD_SERVER); - //setImageDescriptor(org.apache.qpid.management.ui.Activator.getImageDescriptor("/icons/add.gif")); - } - */ - public void run(IAction action) { if(_window != null) @@ -92,6 +78,17 @@ public class AddServer extends AbstractAction implements IWorkbenchWindowActionD { ViewUtility.popupInfoMessage(ACTION_ADDSERVER, ex.getMessage()); } + catch (IOException ex) + { + if ((ex.getMessage() != null) && (ex.getMessage().indexOf(RMI_SASL_ERROR) != -1)) + { + handleException(ex, null, SECURITY_FAILURE); + } + else + { + handleException(ex, null, SERVER_UNAVAILABLE); + } + } catch (Exception ex) { handleException(ex, null, null); @@ -110,45 +107,6 @@ public class AddServer extends AbstractAction implements IWorkbenchWindowActionD } /** - * Selection in the workbench has been changed. We - * can change the state of the 'real' action here - * if we want, but this can only happen after - * the delegate has been created. - * @see IWorkbenchWindowActionDelegate#selectionChanged - */ - public void selectionChanged(IAction action, ISelection selection) { - } - - /** - * We can use this method to dispose of any system - * resources we previously allocated. - * @see IWorkbenchWindowActionDelegate#dispose - */ - public void dispose() { - - } - - private NavigationView getNavigationView() - { - if (_navigationView == null) - { - _navigationView = (NavigationView)_window.getActivePage().findView(NavigationView.ID); - } - - return _navigationView; - } - - /* - public void run() - { - if(_window != null) - { - createWidgets(); - } - } - */ - - /** * Creates the shell and then opens the popup where user can enter new connection details. * Connects to the new server and adds the server in the navigation page. * Pops up any error occured in connecting to the new server diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/CloseConnection.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/CloseConnection.java index 3907424748..a3e52149df 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/CloseConnection.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/CloseConnection.java @@ -25,7 +25,6 @@ import org.apache.qpid.management.ui.exceptions.InfoRequiredException; import org.apache.qpid.management.ui.views.NavigationView; import org.apache.qpid.management.ui.views.ViewUtility; import org.eclipse.jface.action.IAction; -import org.eclipse.jface.viewers.ISelection; import org.eclipse.ui.IWorkbenchWindowActionDelegate; public class CloseConnection extends AbstractAction implements IWorkbenchWindowActionDelegate @@ -53,24 +52,5 @@ public class CloseConnection extends AbstractAction implements IWorkbenchWindowA handleException(ex, null, null); } } - } - - /** - * Selection in the workbench has been changed. We - * can change the state of the 'real' action here - * if we want, but this can only happen after - * the delegate has been created. - * @see IWorkbenchWindowActionDelegate#selectionChanged - */ - public void selectionChanged(IAction action, ISelection selection) { - } - - /** - * We can use this method to dispose of any system - * resources we previously allocated. - * @see IWorkbenchWindowActionDelegate#dispose - */ - public void dispose() { - - } + } } diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/EditAttribute.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/EditAttribute.java index 69e74898ab..d3af3661b0 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/EditAttribute.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/EditAttribute.java @@ -25,7 +25,6 @@ import org.apache.qpid.management.ui.exceptions.InfoRequiredException; import org.apache.qpid.management.ui.views.MBeanView; import org.apache.qpid.management.ui.views.ViewUtility; import org.eclipse.jface.action.IAction; -import org.eclipse.jface.viewers.ISelection; import org.eclipse.ui.IWorkbenchWindowActionDelegate; public class EditAttribute extends AbstractAction implements IWorkbenchWindowActionDelegate @@ -49,23 +48,4 @@ public class EditAttribute extends AbstractAction implements IWorkbenchWindowAct } } } - - /** - * Selection in the workbench has been changed. We - * can change the state of the 'real' action here - * if we want, but this can only happen after - * the delegate has been created. - * @see IWorkbenchWindowActionDelegate#selectionChanged - */ - public void selectionChanged(IAction action, ISelection selection) { - } - - /** - * We can use this method to dispose of any system - * resources we previously allocated. - * @see IWorkbenchWindowActionDelegate#dispose - */ - public void dispose() { - - } } diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/ReconnectServer.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/ReconnectServer.java index 3c0dea586e..609484a557 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/ReconnectServer.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/ReconnectServer.java @@ -27,14 +27,14 @@ import static org.apache.qpid.management.ui.Constants.INFO_USERNAME; import static org.apache.qpid.management.ui.Constants.PASSWORD; import static org.apache.qpid.management.ui.Constants.USERNAME; +import java.io.IOException; + import org.apache.qpid.management.ui.ApplicationRegistry; import org.apache.qpid.management.ui.Constants; import org.apache.qpid.management.ui.exceptions.InfoRequiredException; -import org.apache.qpid.management.ui.views.NavigationView; import org.apache.qpid.management.ui.views.TreeObject; import org.apache.qpid.management.ui.views.ViewUtility; import org.eclipse.jface.action.IAction; -import org.eclipse.jface.viewers.ISelection; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; @@ -50,45 +50,12 @@ import org.eclipse.ui.IWorkbenchWindowActionDelegate; public class ReconnectServer extends AbstractAction implements IWorkbenchWindowActionDelegate { - private NavigationView _navigationView; private String _title; private String _serverName; private String _user; private String _password; private boolean _connect; - /** - * Selection in the workbench has been changed. We - * can change the state of the 'real' action here - * if we want, but this can only happen after - * the delegate has been created. - * @see IWorkbenchWindowActionDelegate#selectionChanged - */ - public void selectionChanged(IAction action, ISelection selection) - { - - } - - /** - * We can use this method to dispose of any system - * resources we previously allocated. - * @see IWorkbenchWindowActionDelegate#dispose - */ - public void dispose() - { - - } - - private NavigationView getNavigationView() - { - if (_navigationView == null) - { - _navigationView = (NavigationView)_window.getActivePage().findView(NavigationView.ID); - } - - return _navigationView; - } - public void run(IAction action) { if(_window != null) @@ -114,6 +81,17 @@ public class ReconnectServer extends AbstractAction implements IWorkbenchWindowA { ViewUtility.popupInfoMessage("Reconnect Qpid server", ex.getMessage()); } + catch (IOException ex) + { + if ((ex.getMessage() != null) && (ex.getMessage().indexOf(RMI_SASL_ERROR) != -1)) + { + handleException(ex, null, SECURITY_FAILURE); + } + else + { + handleException(ex, null, SERVER_UNAVAILABLE); + } + } catch (Exception ex) { handleException(ex, null, null); diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/Refresh.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/Refresh.java index b76c36c649..34251c12d7 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/Refresh.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/Refresh.java @@ -24,7 +24,6 @@ import org.apache.qpid.management.ui.jmx.MBeanUtility; import org.apache.qpid.management.ui.views.MBeanView; import org.apache.qpid.management.ui.views.NavigationView; import org.eclipse.jface.action.IAction; -import org.eclipse.jface.viewers.ISelection; import org.eclipse.ui.IWorkbenchWindowActionDelegate; /** @@ -32,29 +31,7 @@ import org.eclipse.ui.IWorkbenchWindowActionDelegate; * @author Bhupendra Bhardwaj */ public class Refresh extends AbstractAction implements IWorkbenchWindowActionDelegate -{ - /** - * Selection in the workbench has been changed. We - * can change the state of the 'real' action here - * if we want, but this can only happen after - * the delegate has been created. - * @see IWorkbenchWindowActionDelegate#selectionChanged - */ - public void selectionChanged(IAction action, ISelection selection) - { - - } - - /** - * We can use this method to dispose of any system - * resources we previously allocated. - * @see IWorkbenchWindowActionDelegate#dispose - */ - public void dispose() - { - - } - +{ public void run(IAction action) { if(_window != null) diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/RemoveServer.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/RemoveServer.java index f8878c44a1..e329255414 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/RemoveServer.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/RemoveServer.java @@ -24,33 +24,10 @@ import org.apache.qpid.management.ui.exceptions.InfoRequiredException; import org.apache.qpid.management.ui.views.NavigationView; import org.apache.qpid.management.ui.views.ViewUtility; import org.eclipse.jface.action.IAction; -import org.eclipse.jface.viewers.ISelection; import org.eclipse.ui.IWorkbenchWindowActionDelegate; public class RemoveServer extends AbstractAction implements IWorkbenchWindowActionDelegate -{ - /** - * Selection in the workbench has been changed. We - * can change the state of the 'real' action here - * if we want, but this can only happen after - * the delegate has been created. - * @see IWorkbenchWindowActionDelegate#selectionChanged - */ - public void selectionChanged(IAction action, ISelection selection) - { - - } - - /** - * We can use this method to dispose of any system - * resources we previously allocated. - * @see IWorkbenchWindowActionDelegate#dispose - */ - public void dispose() - { - - } - +{ public void run(IAction action) { if(_window != null) diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/VersionAction.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/VersionAction.java new file mode 100644 index 0000000000..11db02f5a2 --- /dev/null +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/VersionAction.java @@ -0,0 +1,89 @@ +/* + * + * 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. + * + */ +package org.apache.qpid.management.ui.actions; + +import java.io.InputStream; +import java.util.Properties; + +import org.apache.qpid.management.ui.Constants; +import org.apache.qpid.management.ui.jmx.MBeanUtility; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.ui.IWorkbenchWindow; + +public class VersionAction extends Action +{ + private IWorkbenchWindow _window; + public static final String VERSION_RESOURCE = "qpidversion.properties"; + + public static final String PRODUCT_NAME_PROPERTY = "qpid.name"; + public static final String RELEASE_VERSION_PROPERTY = "qpid.version"; + public static final String BUILD_VERSION_PROPERTY = "qpid.svnversion"; + + private static final String DEFAULT = "unknown"; + private static String _releaseVersion; + private static String _buildVersion; + private static String _text; + + static + { + Properties props = new Properties(); + try + { + InputStream propertyStream = VersionAction.class.getClassLoader().getResourceAsStream(VERSION_RESOURCE); + if (propertyStream != null) + { + props.load(propertyStream); + _releaseVersion = readPropertyValue(props, RELEASE_VERSION_PROPERTY); + _buildVersion = readPropertyValue(props, BUILD_VERSION_PROPERTY); + _text = "Build Version : " + _buildVersion + "\n" + + "Release Version : " + _releaseVersion; + } + } + catch (Exception ex) + { + MBeanUtility.printStackTrace(ex); + } + } + + public VersionAction(IWorkbenchWindow window) + { + _window = window; + setText("About " + Constants.APPLICATION_NAME); + setId("qpidmc.about"); + setActionDefinitionId("qpidmc.about"); + } + + private static String readPropertyValue(Properties props, String propertyName) + { + String retVal = (String) props.get(propertyName); + if (retVal == null) + { + retVal = DEFAULT; + } + return retVal; + } + + public void run() + { + MessageDialog.openInformation(_window.getShell(), Constants.APPLICATION_NAME, _text); + } +} diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java index 816c479cf9..988b22b4cf 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java @@ -39,6 +39,7 @@ import javax.management.ObjectName; import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; +import javax.security.auth.callback.CallbackHandler; import javax.security.sasl.SaslClientFactory; import org.apache.qpid.management.ui.ApplicationRegistry; @@ -58,6 +59,8 @@ import org.apache.qpid.management.ui.sasl.UsernameHashedPasswordCallbackHandler; public class JMXServerRegistry extends ServerRegistry { private ObjectName _serverObjectName = null; + private Map<String, Object> _env = null; + private JMXServiceURL _jmxUrl = null; private JMXConnector _jmxc = null; private MBeanServerConnection _mbsc = null; @@ -92,68 +95,28 @@ public class JMXServerRegistry extends ServerRegistry public JMXServerRegistry(ManagedServer server) throws Exception { super(server); - JMXServiceURL jmxUrl = new JMXServiceURL(server.getUrl()); - Map<String, Object> env = null; String securityMechanism = ApplicationRegistry.getSecurityMechanism(); + String connectorClassName = ApplicationRegistry.getJMXConnectorClass(); + + boolean saslPluginAvailable = false; - if (securityMechanism != null) - { + if ((securityMechanism != null) && (connectorClassName != null)) + { try { - // Check if the JMXMP connector is available - Class klass = Class.forName("javax.management.remote.jmxmp.JMXMPConnector"); - - jmxUrl = new JMXServiceURL("jmxmp", server.getHost(), server.getPort()); - env = new HashMap<String, Object>(); - - if (MECH_CRAMMD5.equals(securityMechanism)) - { - // For SASL/CRAM-MD5 - Map<String, Class<? extends SaslClientFactory>> map = new HashMap<String, Class<? extends SaslClientFactory>>(); - Class<?> clazz = Class.forName("org.apache.qpid.management.ui.sasl.CRAMMD5HashedSaslClientFactory"); - map.put("CRAM-MD5-HASHED", (Class<? extends SaslClientFactory>) clazz); - - Security.addProvider(new JCAProvider(map)); - env.put("jmx.remote.profiles", SASL_CRAMMD5); - env.put("jmx.remote.sasl.callback.handler", - new UsernameHashedPasswordCallbackHandler(server.getUser(), server.getPassword())); - } - else if (MECH_PLAIN.equals(securityMechanism)) - { - // For SASL/PLAIN - Security.addProvider(new SaslProvider()); - env.put("jmx.remote.profiles", SASL_PLAIN); - env.put("jmx.remote.sasl.callback.handler", - new UserPasswordCallbackHandler(server.getUser(), server.getPassword())); - } - else - { - MBeanUtility.printOutput("Security mechanism " + securityMechanism + " is not supported."); - } - - // Now create the instance of JMXMPConnector - Class[] paramTypes = {JMXServiceURL.class, Map.class}; - Constructor cons = klass.getConstructor(paramTypes); - - Object[] args = {jmxUrl, env}; - Object theObject = cons.newInstance(args); - - _jmxc = (JMXConnector)theObject; - _jmxc.connect(); - MBeanUtility.printOutput("Starting JMXConnector with SASL. Server=" + server.getName()); + createSASLConnector(securityMechanism, connectorClassName); + saslPluginAvailable = true; } catch (Exception ex) { - // When JMXMPConnector is not available - MBeanUtility.printOutput("Starting JMXConnector. Server=" + server.getName()); - jmxUrl = new JMXServiceURL(server.getUrl()); - _jmxc = JMXConnectorFactory.connect(jmxUrl, null); + MBeanUtility.printStackTrace(ex); } } - else + + if (!saslPluginAvailable) { - jmxUrl = new JMXServiceURL(server.getUrl()); - _jmxc = JMXConnectorFactory.connect(jmxUrl, null); + _jmxUrl = new JMXServiceURL(server.getUrl()); + _jmxc = JMXConnectorFactory.connect(_jmxUrl, null); } _mbsc = _jmxc.getMBeanServerConnection(); @@ -171,6 +134,53 @@ public class JMXServerRegistry extends ServerRegistry return _mbsc; } + private void createSASLConnector(String mech, String className) throws Exception + { + String text = "Security mechanism " + mech + " is not supported."; + // Check if the given connector, which supports SASL is available + Class connectorClass = Class.forName(className); + + _jmxUrl = new JMXServiceURL("jmxmp", getManagedServer().getHost(), getManagedServer().getPort()); + _env = new HashMap<String, Object>(); + CallbackHandler handler; + if (MECH_CRAMMD5.equals(mech)) + { + // For SASL/CRAM-MD5 + Map<String, Class<? extends SaslClientFactory>> map = new HashMap<String, Class<? extends SaslClientFactory>>(); + Class<?> clazz = Class.forName("org.apache.qpid.management.ui.sasl.CRAMMD5HashedSaslClientFactory"); + map.put("CRAM-MD5-HASHED", (Class<? extends SaslClientFactory>) clazz); + + Security.addProvider(new JCAProvider(map)); + handler = new UsernameHashedPasswordCallbackHandler(getManagedServer().getUser(), + getManagedServer().getPassword()); + _env.put("jmx.remote.profiles", SASL_CRAMMD5); + _env.put("jmx.remote.sasl.callback.handler", handler); + + } + else if (MECH_PLAIN.equals(mech)) + { + // For SASL/PLAIN + Security.addProvider(new SaslProvider()); + handler = new UserPasswordCallbackHandler(getManagedServer().getUser(), getManagedServer().getPassword()); + _env.put("jmx.remote.profiles", SASL_PLAIN); + _env.put("jmx.remote.sasl.callback.handler", handler); + } + else + { + MBeanUtility.printOutput(text); + throw new Exception(text); + } + // Now create the instance of JMXMPConnector + Class[] paramTypes = {JMXServiceURL.class, Map.class}; + Constructor cons = connectorClass.getConstructor(paramTypes); + + Object[] args = {_jmxUrl, _env}; + Object theObject = cons.newInstance(args); + + _jmxc = (JMXConnector)theObject; + _jmxc.connect(); + } + /** * removes all listeners from the mbean server. This is required when user * disconnects the Qpid server connection diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java index e5f99c2f7b..1da13a9b56 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java @@ -208,16 +208,9 @@ public class NavigationView extends ViewPart */ private void createRMIServerConnection(ManagedServer server) throws Exception { - try - { - // Currently Qpid Management Console only supports JMX MBeanServer - ServerRegistry serverRegistry = new JMXServerRegistry(server); - ApplicationRegistry.addServer(server, serverRegistry); - } - catch (IOException ex) - { - throw (Exception)ex.getCause(); - } + // Currently Qpid Management Console only supports JMX MBeanServer + ServerRegistry serverRegistry = new JMXServerRegistry(server); + ApplicationRegistry.addServer(server, serverRegistry); } /** diff --git a/java/management/eclipse-plugin/src/main/resources/sasl/MANIFEST.MF b/java/management/eclipse-plugin/src/main/resources/sasl/MANIFEST.MF index 7a9e5caaaf..ad274a8f89 100644 --- a/java/management/eclipse-plugin/src/main/resources/sasl/MANIFEST.MF +++ b/java/management/eclipse-plugin/src/main/resources/sasl/MANIFEST.MF @@ -1,19 +1,8 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Jmxmp Plug-in -Bundle-SymbolicName: jmxremote.optional -Bundle-Version: 1.0.1 -Bundle-ClassPath: . -Bundle-Vendor: -Bundle-Localization: plugin -Export-Package: com.sun.jmx.remote.generic, - com.sun.jmx.remote.opt.internal, - com.sun.jmx.remote.opt.security, - com.sun.jmx.remote.opt.util, - com.sun.jmx.remote.profile.sasl, - com.sun.jmx.remote.profile.tls, - com.sun.jmx.remote.protocol.jmxmp, - com.sun.jmx.remote.socket, - javax.management.remote.generic, - javax.management.remote.jmxmp, - javax.management.remote.message +Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: jmx sasl Plug-in
+Bundle-SymbolicName: jmxremote.sasl
+Bundle-Version: 1.0.1
+Bundle-ClassPath: .
+Bundle-Vendor:
+Bundle-Localization: plugin
diff --git a/java/management/eclipse-plugin/src/main/resources/win32/configuration/config.ini b/java/management/eclipse-plugin/src/main/resources/win32/configuration/config.ini index 1762840aff..e83321e650 100644 --- a/java/management/eclipse-plugin/src/main/resources/win32/configuration/config.ini +++ b/java/management/eclipse-plugin/src/main/resources/win32/configuration/config.ini @@ -22,5 +22,5 @@ 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,jmxremote.optional,org.eclipse.ui.workbench
+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,jmxremote.sasl,org.eclipse.ui.workbench
osgi.bundles.defaultStartLevel=4
diff --git a/java/perftests/etc/scripts/sendAndWaitClient.sh b/java/perftests/etc/scripts/sendAndWaitClient.sh new file mode 100755 index 0000000000..af4b788658 --- /dev/null +++ b/java/perftests/etc/scripts/sendAndWaitClient.sh @@ -0,0 +1,22 @@ +#!/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 -Dlog4j.configuration=backup-log4j.xml -cp qpid-perftests-1.0-incubating-M2-SNAPSHOT-all-test-deps.jar org.apache.qpid.ping.PingSendOnlyClient messageSize=512 diff --git a/java/perftests/src/main/java/org/apache/qpid/ping/PingSendOnlyClient.java b/java/perftests/src/main/java/org/apache/qpid/ping/PingSendOnlyClient.java index 7cf5e4516f..29757a20ba 100644 --- a/java/perftests/src/main/java/org/apache/qpid/ping/PingSendOnlyClient.java +++ b/java/perftests/src/main/java/org/apache/qpid/ping/PingSendOnlyClient.java @@ -6,6 +6,12 @@ import java.util.Properties; import org.apache.log4j.Logger;
import org.apache.qpid.util.CommandLineParser;
+import org.apache.qpid.client.message.TestMessageFactory;
+
+import javax.jms.ObjectMessage;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
/**
* <p><table id="crc"><caption>CRC Card</caption>
@@ -32,7 +38,7 @@ public class PingSendOnlyClient extends PingDurableClient {
// Create a ping producer overriding its defaults with all options passed on the command line.
Properties options = CommandLineParser.processCommandLine(args, new CommandLineParser(new String[][] {}));
- PingDurableClient pingProducer = new PingSendOnlyClient(options);
+ PingSendOnlyClient pingProducer = new PingSendOnlyClient(options);
// Create a shutdown hook to terminate the ping-pong producer.
Runtime.getRuntime().addShutdownHook(pingProducer.getShutdownHook());
@@ -54,4 +60,14 @@ public class PingSendOnlyClient extends PingDurableClient System.exit(1);
}
}
+
+ public Message getTestMessage(Destination replyQueue, int messageSize, boolean persistent) throws JMSException
+ {
+ Message msg = TestMessageFactory.newTextMessage(_producerSession, messageSize);
+
+ // Timestamp the message in nanoseconds.
+ msg.setLongProperty(MESSAGE_TIMESTAMP_PROPNAME, System.nanoTime());
+
+ return msg;
+ }
}
diff --git a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java index ecaf27167f..5dec2125ee 100644 --- a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java +++ b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java @@ -1049,7 +1049,7 @@ public class PingPongProducer implements Runnable, MessageListener, ExceptionLis try
{
// Generate a sample message and time stamp it.
- ObjectMessage msg = getTestMessage(_replyDestination, _messageSize, _persistent);
+ Message msg = getTestMessage(_replyDestination, _messageSize, _persistent);
msg.setLongProperty(MESSAGE_TIMESTAMP_PROPNAME, System.nanoTime());
// Send the message and wait for a reply.
@@ -1096,7 +1096,7 @@ public class PingPongProducer implements Runnable, MessageListener, ExceptionLis *
* @throws javax.jms.JMSException All underlying JMSException are allowed to fall through.
*/
- public ObjectMessage getTestMessage(Destination replyQueue, int messageSize, boolean persistent) throws JMSException
+ public Message getTestMessage(Destination replyQueue, int messageSize, boolean persistent) throws JMSException
{
ObjectMessage msg = TestMessageFactory.newObjectMessage(_producerSession, replyQueue, messageSize, persistent);
diff --git a/java/perftests/src/test/java/org/apache/qpid/ping/PingLatencyTestPerf.java b/java/perftests/src/test/java/org/apache/qpid/ping/PingLatencyTestPerf.java index b303e16d2c..c822964152 100644 --- a/java/perftests/src/test/java/org/apache/qpid/ping/PingLatencyTestPerf.java +++ b/java/perftests/src/test/java/org/apache/qpid/ping/PingLatencyTestPerf.java @@ -168,7 +168,7 @@ public class PingLatencyTestPerf extends PingTestPerf implements TimingControlle pingClient.setChainedMessageListener(batchedResultsListener);
// Generate a sample message of the specified size.
- ObjectMessage msg =
+ Message msg =
pingClient.getTestMessage(perThreadSetup._pingClient.getReplyDestinations().get(0),
testParameters.getPropertyAsInteger(PingPongProducer.MESSAGE_SIZE_PROPNAME),
testParameters.getPropertyAsBoolean(PingPongProducer.PERSISTENT_MODE_PROPNAME));
diff --git a/java/perftests/src/test/java/org/apache/qpid/ping/PingTestPerf.java b/java/perftests/src/test/java/org/apache/qpid/ping/PingTestPerf.java index fd3bc3ff23..6e8bf65198 100644 --- a/java/perftests/src/test/java/org/apache/qpid/ping/PingTestPerf.java +++ b/java/perftests/src/test/java/org/apache/qpid/ping/PingTestPerf.java @@ -140,7 +140,7 @@ public class PingTestPerf extends AsymptoticTestCase implements TestThreadAware }
// Generate a sample message. This message is already time stamped and has its reply-to destination set.
- ObjectMessage msg =
+ Message msg =
perThreadSetup._pingClient.getTestMessage(perThreadSetup._pingClient.getReplyDestinations().get(0),
testParameters.getPropertyAsInteger(PingPongProducer.MESSAGE_SIZE_PROPNAME),
testParameters.getPropertyAsBoolean(PingPongProducer.PERSISTENT_MODE_PROPNAME));
diff --git a/java/perftests/src/test/java/org/apache/qpid/requestreply/PingPongTestPerf.java b/java/perftests/src/test/java/org/apache/qpid/requestreply/PingPongTestPerf.java index a09324b568..9a9f9ba6b5 100644 --- a/java/perftests/src/test/java/org/apache/qpid/requestreply/PingPongTestPerf.java +++ b/java/perftests/src/test/java/org/apache/qpid/requestreply/PingPongTestPerf.java @@ -148,7 +148,7 @@ public class PingPongTestPerf extends AsymptoticTestCase PerThreadSetup perThreadSetup = threadSetup.get();
// Generate a sample message. This message is already time stamped and has its reply-to destination set.
- ObjectMessage msg =
+ Message msg =
perThreadSetup._testPingProducer.getTestMessage(perThreadSetup._testPingProducer.getReplyDestinations().get(0),
testParameters.getPropertyAsInteger(PingPongProducer.MESSAGE_SIZE_PROPNAME),
testParameters.getPropertyAsBoolean(PingPongProducer.PERSISTENT_MODE_PROPNAME));
|