The advantage of using JMS Queues or Topics is that messages can be processed asynchronously. Sometimes you need to pause the processing temporarily. Say for example, your messages write data to a database but the database is shutdown in the evenings. What do you do with the messages in the Queue or Topic? The JMS API says that invoking stop() on the Connection object but how do you obtain Connection reference of the MDB?

In WebSphere, message delivery is controlled by a Listener Port. What you can do is get hold of ListenerPort's MBean and call operations on that. Use wsadmin tool to view MBeans available in WebSphere. If you have WebSphere make sure it's bin folder is in PATH. To start the wsadmin tool, make sure WebSphere is started and in a shell, type the following:

C:\>wsadmin
WASX7209I: Connected to process "server1" on node WS-3391 using SOAP connector;
The type of process is: UnManagedProcess
WASX7029I: For help, enter: "$Help help"

wsadmin>$AdminControl queryNames *:*,type=ListenerPort
WebSphere:platform=common,cell=vkandy1,version=5.0,
name=KSIDemoTopicListener,mbeanIdentifier=com.ibm.websphere.models.config.
applicationserver.ejbcontainer.messagelistener.impl.ListenerPortImpl,
type=ListenerPort,node=vkandy1,process=server1
wsadmin>
This prints out all the listener ports declared in WebSphere. In this scenario, you can see I have a listener port named KSIDemoTopicListener. Every listener port in WebSphere has an MBean associated with it. You can get reference to this MBean and invoke stop() and start() methods on it temporarily pause message delivery. The following servlet demonstrates how to invoke MBean methods.
/**
 * @(#)ControlMessageDeliveryServlet.java	Mar 12, 2008
 */
package com.allstream.icms.oe.web;

import java.io.IOException;
import java.util.Set;

import javax.management.InstanceNotFoundException;
import javax.management.IntrospectionException;
import javax.management.MBeanException;
import javax.management.MBeanInfo;
import javax.management.ObjectName;
import javax.management.ReflectionException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ibm.websphere.management.AdminService;
import com.ibm.websphere.management.AdminServiceFactory;

/**
 * Servlet to control MEssage Delivery
 *
 * @author $Author: Kandy Software Inc.$
 * @version $Revision: 1.0$
 */
public class ControlMessageDeliveryServlet extends HttpServlet {
	/**
	 * Processes GET requests
	 */
	public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request, response);
	}

	/**
	 * Processes GET requests
	 */
	public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		try {
			String command = request.getParameter("cmd");
			Object params[] = {};
			String signature[] = {};
			String listnerPort = "*:*,type=ListenerPort,name=KSIDemoTopicListener";
			ObjectName queryName = new ObjectName(listnerPort);
			if (command.equalsIgnoreCase("start")) {
				invokeMethodOnMBean(queryName, "start", params, signature);
			} else if (command.equalsIgnoreCase("stop")) {
				invokeMethodOnMBean(queryName, "start", params, signature);
			}
		} catch (Exception e) {
			// do something ...
		}
	}

	protected Object invokeMethodOnMBean(final ObjectName queryName, final String operationName, final Object[] params,
			final String[] signature) {
		Object result = null;

		try {
			AdminService adminService = AdminServiceFactory.getAdminService();
			Set s = adminService.queryNames(queryName, null);
			if (!s.isEmpty()) {
				ObjectName mBean = (ObjectName) s.iterator().next();
				MBeanInfo mBeanInfo = adminService.getMBeanInfo(mBean);
				// Invoke to print all methods exposed by this MBean
				// getJavadoc(mBeanInfo);
				result = adminService.invoke(mBean, operationName, params, signature);
			}
		} catch (InstanceNotFoundException e) {
		} catch (IntrospectionException e) {
		} catch (ReflectionException e) {
		} catch (MBeanException e) {
		}
		return result;
	}
}
Optionally you can add this method to print out all methods an MBean exposes.
	/**
	 * Prints all operations available on an MBean
	 *
	 * @param mBeanInfo
	 * @return
	 */
	public String getJavadoc(MBeanInfo mBeanInfo) {
		StringBuffer javadoc = new StringBuffer();
		MBeanOperationInfo operations[] = mBeanInfo.getOperations();
		for (int index = 0; index < operations.length; index++) {
			MBeanOperationInfo operation = operations[index];
			javadoc.append("\n");
			javadoc.append("/**");
			javadoc.append("\n");
			javadoc.append("* ").append(operation.getDescription());
			javadoc.append("\n");
			javadoc.append("*/");
			javadoc.append("\n");
			javadoc.append(operation.getReturnType() + " " + operation.getName() + " (");
			MBeanParameterInfo signature[] = operation.getSignature();
			if (signature.length > 0) {
				javadoc.append("\n");
				for (int i = 0; i < signature.length; i++) {
					javadoc.append(signature[i].getType());
					javadoc.append(" ");
					javadoc.append(signature[i].getName());
					javadoc.append(" //");
					javadoc.append(signature[i].getDescription());
					javadoc.append("\n");
				}
			}
			javadoc.append(");");
		}
		return javadoc.toString();
	}