This closes #686

This commit is contained in:
Clebert Suconic 2016-07-29 15:38:09 -04:00
commit 9073e4cd74
8 changed files with 14 additions and 18 deletions

View File

@ -156,7 +156,7 @@ public final class JsonUtil {
array[i] = map;
}
else {
if (val == JsonObject.NULL) {
if (val == JsonValue.NULL) {
array[i] = null;
}
else {

View File

@ -94,6 +94,7 @@ public final class ClientRequestor implements AutoCloseable {
*
* @throws Exception if an exception occurs while closing the ClientRequestor
*/
@Override
public void close() throws Exception {
replyConsumer.close();
requestProducer.close();

View File

@ -26,7 +26,7 @@ import java.util.List;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.activemq.artemis.cli.commands.tools.OptionalLocking;
import org.apache.activemq.artemis.cli.commands.tools.LockAbstract;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
@ -76,7 +76,7 @@ public abstract class ArtemisAbstractPlugin extends AbstractMojo {
// We could execute the maven plugins over and over on examples
// For that reason we just unlock the server here
// Notice this has no implementations if you are using spawn
OptionalLocking.unlock();
LockAbstract.unlock();
}
}

View File

@ -30,7 +30,7 @@ import org.apache.activemq.artemis.core.remoting.impl.netty.NettyServerConnectio
import org.apache.activemq.artemis.core.server.ActiveMQServer;
import org.apache.activemq.artemis.core.server.management.Notification;
import org.apache.activemq.artemis.core.server.management.NotificationListener;
import org.apache.activemq.artemis.jms.client.ActiveMQTopic;
import org.apache.activemq.artemis.jms.client.ActiveMQDestination;
import org.apache.activemq.artemis.spi.core.protocol.ConnectionEntry;
import org.apache.activemq.artemis.spi.core.protocol.MessageConverter;
import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
@ -59,7 +59,7 @@ public class ProtonProtocolManager implements ProtocolManager<Interceptor>, Noti
* used when you want to treat senders as a subscription on an address rather than consuming from the actual queue for
* the address. This can be changed on the acceptor.
* */
private String pubSubPrefix = ActiveMQTopic.JMS_TOPIC_ADDRESS_PREFIX;
private String pubSubPrefix = ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX;
public ProtonProtocolManager(ProtonProtocolManagerFactory factory, ActiveMQServer server) {
this.factory = factory;

View File

@ -22,7 +22,6 @@ import static org.junit.Assume.assumeNotNull;
import java.net.MalformedURLException;
import java.util.Set;
import javax.management.ObjectInstance;
import javax.management.ObjectName;
import org.apache.activemq.broker.BrokerService;
@ -162,11 +161,10 @@ public class DuplexNetworkMBeanTest {
private void logAllMbeans(BrokerService broker) throws MalformedURLException {
try {
// trace all existing MBeans
Set<?> all = broker.getManagementContext().queryNames(null, null);
Set<ObjectName> all = broker.getManagementContext().queryNames(null, null);
LOG.info("Total MBean count=" + all.size());
for (Object o : all) {
ObjectInstance bean = (ObjectInstance) o;
LOG.info(bean.getObjectName().toString());
for (ObjectName on : all) {
LOG.info(on.toString());
}
}
catch (Exception ignored) {

View File

@ -161,11 +161,10 @@ public class DurableSubscriberWithNetworkRestartTest extends JmsMultipleBrokersT
private void logAllMbeans(BrokerService broker) throws MalformedURLException {
try {
// trace all existing MBeans
Set<?> all = broker.getManagementContext().queryNames(null, null);
Set<ObjectName> all = broker.getManagementContext().queryNames(null, null);
LOG.info("Total MBean count=" + all.size());
for (Object o : all) {
//ObjectInstance bean = (ObjectInstance)o;
LOG.info(o);
for (ObjectName on : all) {
LOG.info(on);
}
}
catch (Exception ignored) {

View File

@ -37,6 +37,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.api.core.ActiveMQException;
import org.apache.activemq.artemis.api.core.Interceptor;
import org.apache.activemq.artemis.api.core.Message;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.api.core.TransportConfiguration;
import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
@ -1790,7 +1791,7 @@ public class BridgeTest extends ActiveMQTestBase {
System.out.println("File created at: " + fileInput.getAbsolutePath());
ClientMessage message = session.createMessage(ClientMessage.BYTES_TYPE, true);
ClientMessage message = session.createMessage(Message.BYTES_TYPE, true);
FileInputStream fileInputStream = new FileInputStream(fileInput);
BufferedInputStream bufferedInput = new BufferedInputStream(fileInputStream);

View File

@ -20,7 +20,6 @@ import javax.jms.InvalidSelectorException;
import javax.jms.Session;
import javax.jms.TopicConnection;
import javax.jms.TopicSession;
import javax.naming.InitialContext;
import org.apache.activemq.artemis.jms.tests.util.ProxyAssertSupport;
import org.junit.Test;
@ -35,8 +34,6 @@ public class NonDurableSubscriberTest extends JMSTestCase {
// Attributes ----------------------------------------------------
protected InitialContext ic;
// Constructors --------------------------------------------------
// Public --------------------------------------------------------