http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSession.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSession.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSession.java index 1eb47c9..6cb85b8 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSession.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSession.java @@ -36,13 +36,13 @@ import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.postoffice.QueueBinding; import org.apache.activemq.core.protocol.openwire.AMQTransactionImpl; import org.apache.activemq.core.security.SecurityStore; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.MessageReference; import org.apache.activemq.core.server.Queue; import org.apache.activemq.core.server.ServerConsumer; import org.apache.activemq.core.server.ServerMessage; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.RefsOperation; import org.apache.activemq.core.server.impl.ServerConsumerImpl; import org.apache.activemq.core.server.impl.ServerSessionImpl; @@ -66,7 +66,7 @@ public class AMQServerSession extends ServerSessionImpl RemotingConnection connection, StorageManager storageManager, PostOffice postOffice, ResourceManager resourceManager, SecurityStore securityStore, ManagementService managementService, - HornetQServerImpl hornetQServerImpl, SimpleString managementAddress, + ActiveMQServerImpl activeMQServerImpl, SimpleString managementAddress, SimpleString simpleString, SessionCallback callback, OperationContext context) throws Exception { @@ -77,7 +77,7 @@ public class AMQServerSession extends ServerSessionImpl connection, storageManager, postOffice, resourceManager, securityStore, managementService, - hornetQServerImpl, managementAddress, + activeMQServerImpl, managementAddress, simpleString, callback, context, new AMQTransactionFactory()); } @@ -106,7 +106,7 @@ public class AMQServerSession extends ServerSessionImpl if (consumer == null) { - HornetQServerLogger.LOGGER.debug("There is no consumer with id " + consumerID); + ActiveMQServerLogger.LOGGER.debug("There is no consumer with id " + consumerID); return null; } @@ -231,7 +231,7 @@ public class AMQServerSession extends ServerSessionImpl } else { - HornetQServerLogger.LOGGER.cannotFindConsumer(consumerID); + ActiveMQServerLogger.LOGGER.cannotFindConsumer(consumerID); } } @@ -251,7 +251,7 @@ public class AMQServerSession extends ServerSessionImpl if (binding == null || binding.getType() != BindingType.LOCAL_QUEUE) { - throw HornetQMessageBundle.BUNDLE.noSuchQueue(queueName); + throw ActiveMQMessageBundle.BUNDLE.noSuchQueue(queueName); } Filter filter = FilterImpl.createFilter(filterString); @@ -304,9 +304,9 @@ public class AMQServerSession extends ServerSessionImpl Notification notification = new Notification(null, CoreNotificationType.CONSUMER_CREATED, props); - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Session with user=" + username + ActiveMQServerLogger.LOGGER.debug("Session with user=" + username + ", connection=" + this.remotingConnection + " created a consumer on queue " + queueName + ", filter = " + filterString); @@ -354,9 +354,9 @@ public class AMQServerSession extends ServerSessionImpl tempQueueCleannerUppers.put(name, cleaner); } - if (HornetQServerLogger.LOGGER.isDebugEnabled()) + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { - HornetQServerLogger.LOGGER.debug("Queue " + name + " created on address " + name + + ActiveMQServerLogger.LOGGER.debug("Queue " + name + " created on address " + name + " with filter=" + filterString + " temporary = " + temporary + " durable=" + durable + " on session user=" + this.username + ", connection=" + this.remotingConnection); }
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSessionFactory.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSessionFactory.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSessionFactory.java index bb3f4b8..61fac22 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSessionFactory.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQServerSessionFactory.java @@ -18,7 +18,7 @@ import org.apache.activemq.core.persistence.StorageManager; import org.apache.activemq.core.postoffice.PostOffice; import org.apache.activemq.core.security.SecurityStore; import org.apache.activemq.core.server.ServerSessionFactory; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.ServerSessionImpl; import org.apache.activemq.core.server.management.ManagementService; import org.apache.activemq.core.transaction.ResourceManager; @@ -36,14 +36,14 @@ public class AMQServerSessionFactory implements ServerSessionFactory RemotingConnection connection, StorageManager storageManager, PostOffice postOffice, ResourceManager resourceManager, SecurityStore securityStore, ManagementService managementService, - HornetQServerImpl hornetQServerImpl, SimpleString managementAddress, + ActiveMQServerImpl activeMQServerImpl, SimpleString managementAddress, SimpleString simpleString, SessionCallback callback, OperationContext context) throws Exception { return new AMQServerSession(name, username, password, minLargeMessageSize, autoCommitSends, autoCommitAcks, preAcknowledge, persistDeliveryCountBeforeDelivery, xa, connection, storageManager, postOffice, resourceManager, securityStore, - managementService, hornetQServerImpl, managementAddress, simpleString, callback, + managementService, activeMQServerImpl, managementAddress, simpleString, callback, context); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQSession.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQSession.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQSession.java index d74e091..77b37e4 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQSession.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/amq/AMQSession.java @@ -42,6 +42,7 @@ import org.apache.activemq.command.SessionInfo; import org.apache.activemq.command.TransactionId; import org.apache.activemq.command.TransactionInfo; import org.apache.activemq.command.XATransactionId; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.wireformat.WireFormat; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.paging.impl.PagingStoreImpl; @@ -50,8 +51,7 @@ import org.apache.activemq.core.protocol.openwire.OpenWireMessageConverter; import org.apache.activemq.core.protocol.openwire.OpenWireProtocolManager; import org.apache.activemq.core.protocol.openwire.OpenWireUtil; import org.apache.activemq.core.protocol.openwire.SendingResult; -import org.apache.activemq.core.server.HornetQServer; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQServer; import org.apache.activemq.core.server.ServerConsumer; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.server.impl.ServerMessageImpl; @@ -64,7 +64,7 @@ public class AMQSession implements SessionCallback private AMQServerSession coreSession; private ConnectionInfo connInfo; private SessionInfo sessInfo; - private HornetQServer server; + private ActiveMQServer server; private OpenWireConnection connection; //native id -> consumer private Map<Long, AMQConsumer> consumers = new ConcurrentHashMap<Long, AMQConsumer>(); @@ -82,7 +82,7 @@ public class AMQSession implements SessionCallback private OpenWireProtocolManager manager; public AMQSession(ConnectionInfo connInfo, SessionInfo sessInfo, - HornetQServer server, OpenWireConnection connection, OpenWireProtocolManager manager) + ActiveMQServer server, OpenWireConnection connection, OpenWireProtocolManager manager) { this.connInfo = connInfo; this.sessInfo = sessInfo; @@ -115,7 +115,7 @@ public class AMQSession implements SessionCallback } catch (Exception e) { - HornetQServerLogger.LOGGER.error("error init session", e); + ActiveMQServerLogger.LOGGER.error("error init session", e); } } @@ -221,7 +221,7 @@ public class AMQSession implements SessionCallback return this.coreSession; } - public HornetQServer getCoreServer() + public ActiveMQServer getCoreServer() { return this.server; } @@ -578,7 +578,7 @@ public class AMQSession implements SessionCallback long now = System.currentTimeMillis(); if (now >= nextWarn) { - HornetQServerLogger.LOGGER.warn("Memory Limit reached. Producer (" + producerId + ") stopped to prevent flooding " + ActiveMQServerLogger.LOGGER.warn("Memory Limit reached. Producer (" + producerId + ") stopped to prevent flooding " + result.getBlockingAddress() + " See http://activemq.apache.org/producer-flow-control.html for more info" + " (blocking for " + ((now - start) / 1000) + "s"); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-openwire-protocol/src/main/resources/META-INF/services/org.apache.activemq.spi.core.protocol.ProtocolManagerFactory ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/resources/META-INF/services/org.apache.activemq.spi.core.protocol.ProtocolManagerFactory b/activemq-protocols/activemq-openwire-protocol/src/main/resources/META-INF/services/org.apache.activemq.spi.core.protocol.ProtocolManagerFactory new file mode 100644 index 0000000..82f81bf --- /dev/null +++ b/activemq-protocols/activemq-openwire-protocol/src/main/resources/META-INF/services/org.apache.activemq.spi.core.protocol.ProtocolManagerFactory @@ -0,0 +1 @@ +org.apache.activemq.core.protocol.openwire.OpenWireProtocolManagerFactory http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-openwire-protocol/src/main/resources/META-INF/services/org.hornetq.spi.core.protocol.ProtocolManagerFactory ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/resources/META-INF/services/org.hornetq.spi.core.protocol.ProtocolManagerFactory b/activemq-protocols/activemq-openwire-protocol/src/main/resources/META-INF/services/org.hornetq.spi.core.protocol.ProtocolManagerFactory deleted file mode 100644 index 82f81bf..0000000 --- a/activemq-protocols/activemq-openwire-protocol/src/main/resources/META-INF/services/org.hornetq.spi.core.protocol.ProtocolManagerFactory +++ /dev/null @@ -1 +0,0 @@ -org.apache.activemq.core.protocol.openwire.OpenWireProtocolManagerFactory http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientConnectionContext.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientConnectionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientConnectionContext.java index 5678a38..9b4e77e 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientConnectionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientConnectionContext.java @@ -13,7 +13,7 @@ package org.proton.plug; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; /** * This is valid only on a client connection. @@ -30,5 +30,5 @@ public interface AMQPClientConnectionContext extends AMQPConnectionContext */ void clientOpen(ClientSASL sasl) throws Exception; - AMQPClientSessionContext createClientSession() throws HornetQAMQPException; + AMQPClientSessionContext createClientSession() throws ActiveMQAMQPException; } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientSessionContext.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientSessionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientSessionContext.java index 45cbaad..7f67970 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientSessionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPClientSessionContext.java @@ -13,7 +13,7 @@ package org.proton.plug; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; /** * @author Clebert Suconic @@ -21,7 +21,7 @@ import org.proton.plug.exceptions.HornetQAMQPException; public interface AMQPClientSessionContext extends AMQPSessionContext { - AMQPClientSenderContext createSender(String address, boolean preSettled) throws HornetQAMQPException; + AMQPClientSenderContext createSender(String address, boolean preSettled) throws ActiveMQAMQPException; - AMQPClientReceiverContext createReceiver(String address) throws HornetQAMQPException; + AMQPClientReceiverContext createReceiver(String address) throws ActiveMQAMQPException; } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPSessionContext.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPSessionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPSessionContext.java index 2cc725d..52d906c 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPSessionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/AMQPSessionContext.java @@ -15,7 +15,7 @@ package org.proton.plug; import org.apache.qpid.proton.engine.Receiver; import org.apache.qpid.proton.engine.Sender; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; /** * @author Clebert Suconic @@ -29,7 +29,7 @@ public interface AMQPSessionContext void close(); - void removeSender(Sender sender) throws HornetQAMQPException; + void removeSender(Sender sender) throws ActiveMQAMQPException; void removeReceiver(Receiver receiver); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java index 45a3ef0..86985eb 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java @@ -25,7 +25,7 @@ import org.apache.qpid.proton.engine.Transport; import org.proton.plug.AMQPConnectionCallback; import org.proton.plug.AMQPConnectionContext; import org.proton.plug.SASLResult; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; import org.proton.plug.handler.ProtonHandler; import org.proton.plug.handler.impl.DefaultEventHandler; import org.proton.plug.util.ByteUtil; @@ -111,7 +111,7 @@ public abstract class AbstractConnectionContext extends ProtonInitializable impl handler.close(); } - protected AbstractProtonSessionContext getSessionExtension(Session realSession) throws HornetQAMQPException + protected AbstractProtonSessionContext getSessionExtension(Session realSession) throws ActiveMQAMQPException { AbstractProtonSessionContext sessionExtension = sessions.get(realSession); if (sessionExtension == null) @@ -127,7 +127,7 @@ public abstract class AbstractConnectionContext extends ProtonInitializable impl protected abstract void remoteLinkOpened(Link link) throws Exception; - protected abstract AbstractProtonSessionContext newSessionExtension(Session realSession) throws HornetQAMQPException; + protected abstract AbstractProtonSessionContext newSessionExtension(Session realSession) throws ActiveMQAMQPException; @Override public boolean checkDataReceived() http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonContextSender.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonContextSender.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonContextSender.java index 45b5250..512bc07 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonContextSender.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonContextSender.java @@ -20,12 +20,12 @@ import org.apache.qpid.proton.engine.Delivery; import org.apache.qpid.proton.engine.Sender; import org.apache.qpid.proton.message.ProtonJMessage; import org.proton.plug.AMQPSessionCallback; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; import org.proton.plug.util.CreditsSemaphore; import org.proton.plug.util.NettyWritable; /** - * A this is a wrapper around a HornetQ ServerConsumer for handling outgoing messages and incoming acks via a Proton Sender + * A this is a wrapper around a ActiveMQ ServerConsumer for handling outgoing messages and incoming acks via a Proton Sender * * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> */ @@ -55,7 +55,7 @@ public abstract class AbstractProtonContextSender extends ProtonInitializable im /* * start the session * */ - public void start() throws HornetQAMQPException + public void start() throws ActiveMQAMQPException { sessionSPI.start(); // protonSession.getServerSession().start(); @@ -64,7 +64,7 @@ public abstract class AbstractProtonContextSender extends ProtonInitializable im /* * close the session * */ - public void close() throws HornetQAMQPException + public void close() throws ActiveMQAMQPException { closed = true; protonSession.removeSender(sender); @@ -78,9 +78,9 @@ public abstract class AbstractProtonContextSender extends ProtonInitializable im @Override /* - * handle an incoming Ack from Proton, basically pass to HornetQ to handle + * handle an incoming Ack from Proton, basically pass to ActiveMQ to handle * */ - public abstract void onMessage(Delivery delivery) throws HornetQAMQPException; + public abstract void onMessage(Delivery delivery) throws ActiveMQAMQPException; /* * check the state of the consumer, i.e. are there any more messages. only really needed for browsers? http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonReceiverContext.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonReceiverContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonReceiverContext.java index fb4bb07..3e3daeb 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonReceiverContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonReceiverContext.java @@ -15,12 +15,12 @@ package org.proton.plug.context; import org.apache.qpid.proton.engine.Receiver; import org.proton.plug.AMQPSessionCallback; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; /** * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> * <p/> - * handles incoming messages via a Proton Receiver and forwards them to HornetQ + * handles incoming messages via a Proton Receiver and forwards them to ActiveMQ */ public abstract class AbstractProtonReceiverContext extends ProtonInitializable implements ProtonDeliveryHandler { @@ -51,7 +51,7 @@ public abstract class AbstractProtonReceiverContext extends ProtonInitializable } @Override - public void close() throws HornetQAMQPException + public void close() throws ActiveMQAMQPException { protonSession.removeReceiver(receiver); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonSessionContext.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonSessionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonSessionContext.java index 8f28039..d17e578 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonSessionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonSessionContext.java @@ -24,8 +24,8 @@ import org.apache.qpid.proton.engine.Sender; import org.apache.qpid.proton.engine.Session; import org.proton.plug.AMQPSessionCallback; import org.proton.plug.AMQPSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; -import org.proton.plug.exceptions.HornetQAMQPInternalErrorException; +import org.proton.plug.exceptions.ActiveMQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPInternalErrorException; /** * ProtonSession is a direct representation of the session on the broker. @@ -71,7 +71,7 @@ public abstract class AbstractProtonSessionContext extends ProtonInitializable i } catch (Exception e) { - throw new HornetQAMQPInternalErrorException(e.getMessage(), e); + throw new ActiveMQAMQPInternalErrorException(e.getMessage(), e); } } } @@ -93,7 +93,7 @@ public abstract class AbstractProtonSessionContext extends ProtonInitializable i { protonConsumer.close(); } - catch (HornetQAMQPException e) + catch (ActiveMQAMQPException e) { protonConsumer.getSender().setTarget(null); protonConsumer.getSender().setCondition(new ErrorCondition(e.getAmqpError(), e.getMessage())); @@ -176,7 +176,7 @@ public abstract class AbstractProtonSessionContext extends ProtonInitializable i } @Override - public void removeSender(Sender sender) throws HornetQAMQPException + public void removeSender(Sender sender) throws ActiveMQAMQPException { senders.remove(sender); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonDeliveryHandler.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonDeliveryHandler.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonDeliveryHandler.java index 3436c5c..2411e87 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonDeliveryHandler.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonDeliveryHandler.java @@ -14,7 +14,7 @@ package org.proton.plug.context; import org.apache.qpid.proton.engine.Delivery; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; /** * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> @@ -25,7 +25,7 @@ public interface ProtonDeliveryHandler { void onFlow(int currentCredits); - void onMessage(Delivery delivery) throws HornetQAMQPException; + void onMessage(Delivery delivery) throws ActiveMQAMQPException; - void close() throws HornetQAMQPException; + void close() throws ActiveMQAMQPException; } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonInitializable.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonInitializable.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonInitializable.java index 0dad6d7..bf481a1 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonInitializable.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonInitializable.java @@ -15,9 +15,9 @@ package org.proton.plug.context; import java.util.concurrent.TimeUnit; -import org.proton.plug.exceptions.HornetQAMQPException; -import org.proton.plug.exceptions.HornetQAMQPIllegalStateException; -import org.proton.plug.exceptions.HornetQAMQPTimeoutException; +import org.proton.plug.exceptions.ActiveMQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPIllegalStateException; +import org.proton.plug.exceptions.ActiveMQAMQPTimeoutException; import org.proton.plug.util.FutureRunnable; /** @@ -63,20 +63,20 @@ public class ProtonInitializable } - public void waitWithTimeout(FutureRunnable latch) throws HornetQAMQPException + public void waitWithTimeout(FutureRunnable latch) throws ActiveMQAMQPException { try { // TODO Configure this if (!latch.await(30, TimeUnit.SECONDS)) { - throw new HornetQAMQPTimeoutException("Timed out waiting for response"); + throw new ActiveMQAMQPTimeoutException("Timed out waiting for response"); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); - throw new HornetQAMQPIllegalStateException(e.getMessage()); + throw new ActiveMQAMQPIllegalStateException(e.getMessage()); } } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java index 9f53085..e53e36a 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java @@ -26,8 +26,8 @@ import org.apache.qpid.proton.engine.Delivery; import org.apache.qpid.proton.engine.Receiver; import org.apache.qpid.proton.message.impl.MessageImpl; import org.proton.plug.AMQPSessionCallback; -import org.proton.plug.exceptions.HornetQAMQPException; -import org.proton.plug.logger.HornetQAMQPProtocolMessageBundle; +import org.proton.plug.exceptions.ActiveMQAMQPException; +import org.proton.plug.logger.ActiveMQAMQPProtocolMessageBundle; import static org.proton.plug.util.DeliveryUtil.decodeMessageImpl; import static org.proton.plug.util.DeliveryUtil.readDelivery; @@ -46,7 +46,7 @@ public class ProtonTransactionHandler implements ProtonDeliveryHandler } @Override - public void onMessage(Delivery delivery) throws HornetQAMQPException + public void onMessage(Delivery delivery) throws ActiveMQAMQPException { ByteBuf buffer = PooledByteBufAllocator.DEFAULT.heapBuffer(1024); @@ -87,7 +87,7 @@ public class ProtonTransactionHandler implements ProtonDeliveryHandler } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorRollingbackCoordinator(e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorRollingbackCoordinator(e.getMessage()); } } else @@ -98,7 +98,7 @@ public class ProtonTransactionHandler implements ProtonDeliveryHandler } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorCommittingCoordinator(e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorCommittingCoordinator(e.getMessage()); } } delivery.settle(); @@ -127,7 +127,7 @@ public class ProtonTransactionHandler implements ProtonDeliveryHandler } @Override - public void close() throws HornetQAMQPException + public void close() throws ActiveMQAMQPException { //noop } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContext.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContext.java index 95a7f61..d58a4ef 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContext.java @@ -22,7 +22,7 @@ import org.proton.plug.AMQPConnectionCallback; import org.proton.plug.AMQPSessionCallback; import org.proton.plug.context.AbstractConnectionContext; import org.proton.plug.context.AbstractProtonSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; import org.proton.plug.context.ProtonInitializable; import org.proton.plug.util.FutureRunnable; @@ -56,7 +56,7 @@ public class ProtonClientConnectionContext extends AbstractConnectionContext imp waitWithTimeout(future); } - public AMQPClientSessionContext createClientSession() throws HornetQAMQPException + public AMQPClientSessionContext createClientSession() throws ActiveMQAMQPException { FutureRunnable futureRunnable = new FutureRunnable(1); @@ -76,7 +76,7 @@ public class ProtonClientConnectionContext extends AbstractConnectionContext imp } @Override - protected AbstractProtonSessionContext newSessionExtension(Session realSession) throws HornetQAMQPException + protected AbstractProtonSessionContext newSessionExtension(Session realSession) throws ActiveMQAMQPException { AMQPSessionCallback sessionSPI = connectionCallback.createSessionCallback(this); AbstractProtonSessionContext protonSession = new ProtonClientSessionContext(sessionSPI, this, realSession); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientContext.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientContext.java index f0dc46a..bfe5f24 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientContext.java @@ -25,7 +25,7 @@ import org.proton.plug.AMQPSessionCallback; import org.proton.plug.context.AbstractConnectionContext; import org.proton.plug.context.AbstractProtonContextSender; import org.proton.plug.context.AbstractProtonSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; import org.proton.plug.util.FutureRunnable; /** @@ -44,7 +44,7 @@ public class ProtonClientContext extends AbstractProtonContextSender implements @Override - public void onMessage(Delivery delivery) throws HornetQAMQPException + public void onMessage(Delivery delivery) throws ActiveMQAMQPException { if (delivery.getRemoteState() instanceof Accepted) { http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientReceiverContext.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientReceiverContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientReceiverContext.java index ebf7f7d..f2fddf5 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientReceiverContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientReceiverContext.java @@ -28,7 +28,7 @@ import org.proton.plug.AMQPSessionCallback; import org.proton.plug.context.AbstractConnectionContext; import org.proton.plug.context.AbstractProtonReceiverContext; import org.proton.plug.context.AbstractProtonSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; import static org.proton.plug.util.DeliveryUtil.readDelivery; import static org.proton.plug.util.DeliveryUtil.decodeMessageImpl; @@ -55,7 +55,7 @@ public class ProtonClientReceiverContext extends AbstractProtonReceiverContext i * This may be called more than once per deliver so we have to cache the buffer until we have received it all. * * */ - public void onMessage(Delivery delivery) throws HornetQAMQPException + public void onMessage(Delivery delivery) throws ActiveMQAMQPException { ByteBuf buffer = PooledByteBufAllocator.DEFAULT.heapBuffer(1024); try http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientSessionContext.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientSessionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientSessionContext.java index e888ea9..4e4c080 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientSessionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientSessionContext.java @@ -25,7 +25,7 @@ import org.proton.plug.AMQPClientSessionContext; import org.proton.plug.AMQPSessionCallback; import org.proton.plug.context.AbstractConnectionContext; import org.proton.plug.context.AbstractProtonSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; import org.proton.plug.util.FutureRunnable; /** @@ -39,7 +39,7 @@ public class ProtonClientSessionContext extends AbstractProtonSessionContext imp super(sessionSPI, connection, session); } - public AMQPClientSenderContext createSender(String address, boolean preSettled) throws HornetQAMQPException + public AMQPClientSenderContext createSender(String address, boolean preSettled) throws ActiveMQAMQPException { FutureRunnable futureRunnable = new FutureRunnable(1); @@ -63,7 +63,7 @@ public class ProtonClientSessionContext extends AbstractProtonSessionContext imp return amqpSender; } - public AMQPClientReceiverContext createReceiver(String address) throws HornetQAMQPException + public AMQPClientReceiverContext createReceiver(String address) throws ActiveMQAMQPException { FutureRunnable futureRunnable = new FutureRunnable(1); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContext.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContext.java index 1d83e54..b26a82e 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContext.java @@ -23,7 +23,7 @@ import org.proton.plug.AMQPServerConnectionContext; import org.proton.plug.AMQPSessionCallback; import org.proton.plug.context.AbstractConnectionContext; import org.proton.plug.context.AbstractProtonSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; /** * @author Clebert Suconic @@ -36,7 +36,7 @@ public class ProtonServerConnectionContext extends AbstractConnectionContext imp super(connectionSP); } - protected AbstractProtonSessionContext newSessionExtension(Session realSession) throws HornetQAMQPException + protected AbstractProtonSessionContext newSessionExtension(Session realSession) throws ActiveMQAMQPException { AMQPSessionCallback sessionSPI = connectionCallback.createSessionCallback(this); AbstractProtonSessionContext protonSession = new ProtonServerSessionContext(sessionSPI, this, realSession); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerReceiverContext.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerReceiverContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerReceiverContext.java index 21ca2bc..bef4299 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerReceiverContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerReceiverContext.java @@ -25,9 +25,9 @@ import org.proton.plug.AMQPSessionCallback; import org.proton.plug.context.AbstractConnectionContext; import org.proton.plug.context.AbstractProtonReceiverContext; import org.proton.plug.context.AbstractProtonSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; -import org.proton.plug.exceptions.HornetQAMQPInternalErrorException; -import org.proton.plug.logger.HornetQAMQPProtocolMessageBundle; +import org.proton.plug.exceptions.ActiveMQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPInternalErrorException; +import org.proton.plug.logger.ActiveMQAMQPProtocolMessageBundle; import static org.proton.plug.util.DeliveryUtil.readDelivery; @@ -71,7 +71,7 @@ public class ProtonServerReceiverContext extends AbstractProtonReceiverContext } catch (Exception e) { - throw new HornetQAMQPInternalErrorException(e.getMessage(), e); + throw new ActiveMQAMQPInternalErrorException(e.getMessage(), e); } target.setAddress(queue.toString()); } @@ -82,18 +82,18 @@ public class ProtonServerReceiverContext extends AbstractProtonReceiverContext String address = target.getAddress(); if (address == null) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.targetAddressNotSet(); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.targetAddressNotSet(); } try { if (!sessionSPI.queueQuery(address)) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.addressDoesntExist(); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.addressDoesntExist(); } } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorFindingTemporaryQueue(e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorFindingTemporaryQueue(e.getMessage()); } } } @@ -107,7 +107,7 @@ public class ProtonServerReceiverContext extends AbstractProtonReceiverContext * This may be called more than once per deliver so we have to cache the buffer until we have received it all. * * */ - public void onMessage(Delivery delivery) throws HornetQAMQPException + public void onMessage(Delivery delivery) throws ActiveMQAMQPException { Receiver receiver; try http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSenderContext.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSenderContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSenderContext.java index 9b66de0..380ea4f 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSenderContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSenderContext.java @@ -30,9 +30,9 @@ import org.proton.plug.AMQPSessionCallback; import org.proton.plug.context.AbstractConnectionContext; import org.proton.plug.context.AbstractProtonContextSender; import org.proton.plug.context.AbstractProtonSessionContext; -import org.proton.plug.exceptions.HornetQAMQPException; -import org.proton.plug.exceptions.HornetQAMQPInternalErrorException; -import org.proton.plug.logger.HornetQAMQPProtocolMessageBundle; +import org.proton.plug.exceptions.ActiveMQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPInternalErrorException; +import org.proton.plug.logger.ActiveMQAMQPProtocolMessageBundle; import org.proton.plug.context.ProtonPlugSender; import org.apache.qpid.proton.amqp.messaging.Source; @@ -67,7 +67,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple /* * start the session * */ - public void start() throws HornetQAMQPException + public void start() throws ActiveMQAMQPException { super.start(); // protonSession.getServerSession().start(); @@ -81,12 +81,12 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorStartingConsumer(e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorStartingConsumer(e.getMessage()); } } /** - * create the actual underlying HornetQ Server Consumer + * create the actual underlying ActiveMQ Server Consumer */ @Override public void initialise() throws Exception @@ -122,7 +122,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorCreatingTemporaryQueue(e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorCreatingTemporaryQueue(e.getMessage()); } source.setAddress(queue); } @@ -133,19 +133,19 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple queue = source.getAddress(); if (queue == null) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.sourceAddressNotSet(); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.sourceAddressNotSet(); } try { if (!sessionSPI.queueQuery(queue)) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.sourceAddressDoesntExist(); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.sourceAddressDoesntExist(); } } catch (Exception e) { - throw new HornetQAMQPInternalErrorException(e.getMessage(), e); + throw new ActiveMQAMQPInternalErrorException(e.getMessage(), e); } } @@ -156,7 +156,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorCreatingHornetQConsumer(e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorCreatingActiveMQConsumer(e.getMessage()); } } } @@ -164,7 +164,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple /* * close the session * */ - public void close() throws HornetQAMQPException + public void close() throws ActiveMQAMQPException { super.close(); try @@ -174,12 +174,12 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple catch (Exception e) { e.printStackTrace(); - throw new HornetQAMQPInternalErrorException(e.getMessage()); + throw new ActiveMQAMQPInternalErrorException(e.getMessage()); } } - public void onMessage(Delivery delivery) throws HornetQAMQPException + public void onMessage(Delivery delivery) throws ActiveMQAMQPException { Object message = delivery.getContext(); @@ -200,7 +200,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorAcknowledgingMessage(message.toString(), e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorAcknowledgingMessage(message.toString(), e.getMessage()); } } else if (remoteState instanceof Released) @@ -211,7 +211,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorCancellingMessage(message.toString(), e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorCancellingMessage(message.toString(), e.getMessage()); } } else if (remoteState instanceof Rejected || remoteState instanceof Modified) @@ -222,7 +222,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple } catch (Exception e) { - throw HornetQAMQPProtocolMessageBundle.BUNDLE.errorCancellingMessage(message.toString(), e.getMessage()); + throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorCancellingMessage(message.toString(), e.getMessage()); } } //todo add tag caching @@ -253,7 +253,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple /** - * handle an out going message from HornetQ, send via the Proton Sender + * handle an out going message from ActiveMQ, send via the Proton Sender */ public int deliverMessage(Object message, int deliveryCount) throws Exception { @@ -273,7 +273,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple catch (Throwable e) { e.printStackTrace(); - throw new HornetQAMQPInternalErrorException(e.getMessage(), e); + throw new ActiveMQAMQPInternalErrorException(e.getMessage(), e); } return performSend(serverMessage, message); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSessionContext.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSessionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSessionContext.java index 1860c90..8ce784f 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSessionContext.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSessionContext.java @@ -27,7 +27,7 @@ import org.proton.plug.context.AbstractProtonContextSender; import org.proton.plug.context.AbstractProtonReceiverContext; import org.proton.plug.context.AbstractProtonSessionContext; import org.proton.plug.context.ProtonTransactionHandler; -import org.proton.plug.exceptions.HornetQAMQPException; +import org.proton.plug.exceptions.ActiveMQAMQPException; /** * @author Clebert Suconic @@ -83,7 +83,7 @@ public class ProtonServerSessionContext extends AbstractProtonSessionContext sender.open(); protonSender.start(); } - catch (HornetQAMQPException e) + catch (ActiveMQAMQPException e) { senders.remove(sender); sender.setSource(null); @@ -92,7 +92,7 @@ public class ProtonServerSessionContext extends AbstractProtonSessionContext } } - public void removeSender(Sender sender) throws HornetQAMQPException + public void removeSender(Sender sender) throws ActiveMQAMQPException { ProtonServerSenderContext senderRemoved = (ProtonServerSenderContext) senders.remove(sender); if (senderRemoved != null) @@ -112,7 +112,7 @@ public class ProtonServerSessionContext extends AbstractProtonSessionContext receiver.setContext(protonReceiver); receiver.open(); } - catch (HornetQAMQPException e) + catch (ActiveMQAMQPException e) { receivers.remove(receiver); receiver.setTarget(null); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPException.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPException.java new file mode 100644 index 0000000..8effdd6 --- /dev/null +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPException.java @@ -0,0 +1,45 @@ +/* + * Copyright 2005-2014 Red Hat, Inc. + * Red Hat 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.proton.plug.exceptions; + +import org.apache.qpid.proton.amqp.Symbol; + +/** + * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> + * 6/6/13 + */ +public class ActiveMQAMQPException extends Exception +{ + + private static final String ERROR_PREFIX = "amqp:"; + + public Symbol getAmqpError() + { + return amqpError; + } + + private final Symbol amqpError; + + public ActiveMQAMQPException(Symbol amqpError, String message, Throwable e) + { + super(message, e); + this.amqpError = amqpError; + } + + public ActiveMQAMQPException(Symbol amqpError, String message) + { + super(message); + this.amqpError = amqpError; + } +} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPIllegalStateException.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPIllegalStateException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPIllegalStateException.java new file mode 100644 index 0000000..d1cf795 --- /dev/null +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPIllegalStateException.java @@ -0,0 +1,28 @@ +/* + * Copyright 2005-2014 Red Hat, Inc. + * Red Hat 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.proton.plug.exceptions; + +import org.apache.qpid.proton.amqp.transport.AmqpError; + +/** + * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> + * 6/6/13 + */ +public class ActiveMQAMQPIllegalStateException extends ActiveMQAMQPException +{ + public ActiveMQAMQPIllegalStateException(String message) + { + super(AmqpError.ILLEGAL_STATE, message); + } +} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPInternalErrorException.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPInternalErrorException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPInternalErrorException.java new file mode 100644 index 0000000..065a8c8 --- /dev/null +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPInternalErrorException.java @@ -0,0 +1,33 @@ +/* + * Copyright 2005-2014 Red Hat, Inc. + * Red Hat 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.proton.plug.exceptions; + +import org.apache.qpid.proton.amqp.transport.AmqpError; + +/** + * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> + * 6/6/13 + */ +public class ActiveMQAMQPInternalErrorException extends ActiveMQAMQPException +{ + public ActiveMQAMQPInternalErrorException(String message, Throwable e) + { + super(AmqpError.INTERNAL_ERROR, message, e); + } + + public ActiveMQAMQPInternalErrorException(String message) + { + super(AmqpError.INTERNAL_ERROR, message); + } +} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPInvalidFieldException.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPInvalidFieldException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPInvalidFieldException.java new file mode 100644 index 0000000..781d2dd --- /dev/null +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPInvalidFieldException.java @@ -0,0 +1,28 @@ +/* + * Copyright 2005-2014 Red Hat, Inc. + * Red Hat 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.proton.plug.exceptions; + +import org.apache.qpid.proton.amqp.transport.AmqpError; + +/** + * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> + * 6/6/13 + */ +public class ActiveMQAMQPInvalidFieldException extends ActiveMQAMQPException +{ + public ActiveMQAMQPInvalidFieldException(String message) + { + super(AmqpError.INVALID_FIELD, message); + } +} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPNotImplementedException.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPNotImplementedException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPNotImplementedException.java new file mode 100644 index 0000000..cc19b33 --- /dev/null +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPNotImplementedException.java @@ -0,0 +1,28 @@ +/* + * Copyright 2005-2014 Red Hat, Inc. + * Red Hat 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.proton.plug.exceptions; + +import org.apache.qpid.proton.amqp.transport.AmqpError; + +/** + * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> + * 6/19/13 + */ +public class ActiveMQAMQPNotImplementedException extends ActiveMQAMQPException +{ + public ActiveMQAMQPNotImplementedException(String message) + { + super(AmqpError.NOT_IMPLEMENTED, message); + } +} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPTimeoutException.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPTimeoutException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPTimeoutException.java new file mode 100644 index 0000000..11a595c --- /dev/null +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/ActiveMQAMQPTimeoutException.java @@ -0,0 +1,29 @@ +/* + * Copyright 2005-2014 Red Hat, Inc. + * Red Hat 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.proton.plug.exceptions; + +import org.apache.qpid.proton.amqp.transport.AmqpError; + +/** + * @author Clebert Suconic + */ + +public class ActiveMQAMQPTimeoutException extends ActiveMQAMQPException +{ + public ActiveMQAMQPTimeoutException(String message) + { + super(AmqpError.ILLEGAL_STATE, message); + } + +} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPException.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPException.java deleted file mode 100644 index 0a3c68a..0000000 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPException.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2005-2014 Red Hat, Inc. - * Red Hat 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.proton.plug.exceptions; - -import org.apache.qpid.proton.amqp.Symbol; - -/** - * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> - * 6/6/13 - */ -public class HornetQAMQPException extends Exception -{ - - private static final String ERROR_PREFIX = "amqp:"; - - public Symbol getAmqpError() - { - return amqpError; - } - - private final Symbol amqpError; - - public HornetQAMQPException(Symbol amqpError, String message, Throwable e) - { - super(message, e); - this.amqpError = amqpError; - } - - public HornetQAMQPException(Symbol amqpError, String message) - { - super(message); - this.amqpError = amqpError; - } -} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPIllegalStateException.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPIllegalStateException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPIllegalStateException.java deleted file mode 100644 index f3e3b38..0000000 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPIllegalStateException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2005-2014 Red Hat, Inc. - * Red Hat 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.proton.plug.exceptions; - -import org.apache.qpid.proton.amqp.transport.AmqpError; - -/** - * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> - * 6/6/13 - */ -public class HornetQAMQPIllegalStateException extends HornetQAMQPException -{ - public HornetQAMQPIllegalStateException(String message) - { - super(AmqpError.ILLEGAL_STATE, message); - } -} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPInternalErrorException.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPInternalErrorException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPInternalErrorException.java deleted file mode 100644 index 7db34a7..0000000 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPInternalErrorException.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2005-2014 Red Hat, Inc. - * Red Hat 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.proton.plug.exceptions; - -import org.apache.qpid.proton.amqp.transport.AmqpError; - -/** - * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> - * 6/6/13 - */ -public class HornetQAMQPInternalErrorException extends HornetQAMQPException -{ - public HornetQAMQPInternalErrorException(String message, Throwable e) - { - super(AmqpError.INTERNAL_ERROR, message, e); - } - - public HornetQAMQPInternalErrorException(String message) - { - super(AmqpError.INTERNAL_ERROR, message); - } -} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPInvalidFieldException.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPInvalidFieldException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPInvalidFieldException.java deleted file mode 100644 index 2f73de8..0000000 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPInvalidFieldException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2005-2014 Red Hat, Inc. - * Red Hat 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.proton.plug.exceptions; - -import org.apache.qpid.proton.amqp.transport.AmqpError; - -/** - * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> - * 6/6/13 - */ -public class HornetQAMQPInvalidFieldException extends HornetQAMQPException -{ - public HornetQAMQPInvalidFieldException(String message) - { - super(AmqpError.INVALID_FIELD, message); - } -} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPNotImplementedException.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPNotImplementedException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPNotImplementedException.java deleted file mode 100644 index 35a2143..0000000 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPNotImplementedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2005-2014 Red Hat, Inc. - * Red Hat 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.proton.plug.exceptions; - -import org.apache.qpid.proton.amqp.transport.AmqpError; - -/** - * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> - * 6/19/13 - */ -public class HornetQAMQPNotImplementedException extends HornetQAMQPException -{ - public HornetQAMQPNotImplementedException(String message) - { - super(AmqpError.NOT_IMPLEMENTED, message); - } -} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPTimeoutException.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPTimeoutException.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPTimeoutException.java deleted file mode 100644 index 50d72d8..0000000 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/exceptions/HornetQAMQPTimeoutException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2005-2014 Red Hat, Inc. - * Red Hat 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.proton.plug.exceptions; - -import org.apache.qpid.proton.amqp.transport.AmqpError; - -/** - * @author Clebert Suconic - */ - -public class HornetQAMQPTimeoutException extends HornetQAMQPException -{ - public HornetQAMQPTimeoutException(String message) - { - super(AmqpError.ILLEGAL_STATE, message); - } - -} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/logger/ActiveMQAMQPProtocolMessageBundle.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/logger/ActiveMQAMQPProtocolMessageBundle.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/logger/ActiveMQAMQPProtocolMessageBundle.java new file mode 100644 index 0000000..cf23596 --- /dev/null +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/logger/ActiveMQAMQPProtocolMessageBundle.java @@ -0,0 +1,83 @@ +/* + * Copyright 2005-2014 Red Hat, Inc. + * Red Hat 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.proton.plug.logger; + +import org.proton.plug.exceptions.ActiveMQAMQPIllegalStateException; +import org.proton.plug.exceptions.ActiveMQAMQPInternalErrorException; +import org.proton.plug.exceptions.ActiveMQAMQPInvalidFieldException; +import org.jboss.logging.annotations.Message; +import org.jboss.logging.annotations.MessageBundle; +import org.jboss.logging.Messages; + +/** + * Logger Code 11 + * <p/> + * Each message id must be 6 digits long starting with 10, the 3rd digit should be 9. So the range + * is from 219000 to 119999. + * <p/> + * Once released, methods should not be deleted as they may be referenced by knowledge base + * articles. Unused methods should be marked as deprecated. + * + * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> + */ +@MessageBundle(projectCode = "AMQ") +public interface ActiveMQAMQPProtocolMessageBundle +{ + ActiveMQAMQPProtocolMessageBundle BUNDLE = Messages.getBundle(ActiveMQAMQPProtocolMessageBundle.class); + + + @Message(id = 219000, value = "target address not set", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPInvalidFieldException targetAddressNotSet(); + + @Message(id = 219001, value = "error creating temporary queue, {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPInternalErrorException errorCreatingTemporaryQueue(String message); + + @Message(id = 219002, value = "target address does not exist", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPIllegalStateException addressDoesntExist(); + + @Message(id = 219003, value = "error finding temporary queue, {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPInternalErrorException errorFindingTemporaryQueue(String message); + + @Message(id = 219004, value = "error creating ActiveMQ Session, {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPInternalErrorException errorCreatingActiveMQSession(String message); + + @Message(id = 219005, value = "error creating ActiveMQ Consumer, {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPInternalErrorException errorCreatingActiveMQConsumer(String message); + + @Message(id = 219006, value = "error starting ActiveMQ Consumer, {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPIllegalStateException errorStartingConsumer(String message); + + @Message(id = 219007, value = "error acknowledging message {0}, {1}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPIllegalStateException errorAcknowledgingMessage(String messageID, String message); + + @Message(id = 219008, value = "error cancelling message {0}, {1}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPIllegalStateException errorCancellingMessage(String messageID, String message); + + @Message(id = 219009, value = "error closing consumer {0}, {1}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPIllegalStateException errorClosingConsumer(long consumerID, String message); + + @Message(id = 219010, value = "source address does not exist", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPInvalidFieldException sourceAddressDoesntExist(); + + @Message(id = 219011, value = "source address not set", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPInvalidFieldException sourceAddressNotSet(); + + @Message(id = 219012, value = "error rolling back coordinator: {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPIllegalStateException errorRollingbackCoordinator(String message); + + @Message(id = 219013, value = "error committing coordinator: {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAMQPIllegalStateException errorCommittingCoordinator(String message); + + @Message(id = 219015, value = "error decoding AMQP frame", format = Message.Format.MESSAGE_FORMAT) + String decodeError(); +} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/logger/HornetQAMQPProtocolMessageBundle.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/logger/HornetQAMQPProtocolMessageBundle.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/logger/HornetQAMQPProtocolMessageBundle.java deleted file mode 100644 index c4c22c8..0000000 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/logger/HornetQAMQPProtocolMessageBundle.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2005-2014 Red Hat, Inc. - * Red Hat 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.proton.plug.logger; - -import org.proton.plug.exceptions.HornetQAMQPIllegalStateException; -import org.proton.plug.exceptions.HornetQAMQPInternalErrorException; -import org.proton.plug.exceptions.HornetQAMQPInvalidFieldException; -import org.jboss.logging.annotations.Message; -import org.jboss.logging.annotations.MessageBundle; -import org.jboss.logging.Messages; - -/** - * Logger Code 11 - * <p/> - * Each message id must be 6 digits long starting with 10, the 3rd digit should be 9. So the range - * is from 219000 to 119999. - * <p/> - * Once released, methods should not be deleted as they may be referenced by knowledge base - * articles. Unused methods should be marked as deprecated. - * - * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> - */ -@MessageBundle(projectCode = "HQ") -public interface HornetQAMQPProtocolMessageBundle -{ - HornetQAMQPProtocolMessageBundle BUNDLE = Messages.getBundle(HornetQAMQPProtocolMessageBundle.class); - - - @Message(id = 219000, value = "target address not set", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPInvalidFieldException targetAddressNotSet(); - - @Message(id = 219001, value = "error creating temporary queue, {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPInternalErrorException errorCreatingTemporaryQueue(String message); - - @Message(id = 219002, value = "target address does not exist", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPIllegalStateException addressDoesntExist(); - - @Message(id = 219003, value = "error finding temporary queue, {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPInternalErrorException errorFindingTemporaryQueue(String message); - - @Message(id = 219004, value = "error creating HornetQ Session, {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPInternalErrorException errorCreatingHornetQSession(String message); - - @Message(id = 219005, value = "error creating HornetQ Consumer, {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPInternalErrorException errorCreatingHornetQConsumer(String message); - - @Message(id = 219006, value = "error starting HornetQ Consumer, {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPIllegalStateException errorStartingConsumer(String message); - - @Message(id = 219007, value = "error acknowledging message {0}, {1}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPIllegalStateException errorAcknowledgingMessage(String messageID, String message); - - @Message(id = 219008, value = "error cancelling message {0}, {1}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPIllegalStateException errorCancellingMessage(String messageID, String message); - - @Message(id = 219009, value = "error closing consumer {0}, {1}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPIllegalStateException errorClosingConsumer(long consumerID, String message); - - @Message(id = 219010, value = "source address does not exist", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPInvalidFieldException sourceAddressDoesntExist(); - - @Message(id = 219011, value = "source address not set", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPInvalidFieldException sourceAddressNotSet(); - - @Message(id = 219012, value = "error rolling back coordinator: {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPIllegalStateException errorRollingbackCoordinator(String message); - - @Message(id = 219013, value = "error committing coordinator: {0}", format = Message.Format.MESSAGE_FORMAT) - HornetQAMQPIllegalStateException errorCommittingCoordinator(String message); - - @Message(id = 219015, value = "error decoding AMQP frame", format = Message.Format.MESSAGE_FORMAT) - String decodeError(); -} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/util/ReusableLatch.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/util/ReusableLatch.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/util/ReusableLatch.java index 4f1f01e..80285a4 100644 --- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/util/ReusableLatch.java +++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/util/ReusableLatch.java @@ -23,7 +23,7 @@ import java.util.concurrent.locks.AbstractQueuedSynchronizer; * <p/> * <p>It could be used for sync points when one process is feeding the latch while another will wait when everything is done. (e.g. waiting IO completions to finish)</p> * <p/> - * <p>On HornetQ we have the requirement of increment and decrement a counter until the user fires a ready handler (commit). At that point we just act as a regular countDown.</p> + * <p>On ActiveMQ we have the requirement of increment and decrement a counter until the user fires a ready handler (commit). At that point we just act as a regular countDown.</p> * <p/> * <p>Note: This latch is reusable. Once it reaches zero, you can call up again, and reuse it on further waits.</p> * <p/> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalServer.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalServer.java b/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalServer.java index 0c20c0f..d3c4022 100644 --- a/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalServer.java +++ b/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalServer.java @@ -114,9 +114,9 @@ public class MinimalServer // childOption(ChannelOption.AUTO_READ, false). childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT); - channelGroup = new DefaultChannelGroup("hornetq-accepted-channels", GlobalEventExecutor.INSTANCE); + channelGroup = new DefaultChannelGroup("activemq-accepted-channels", GlobalEventExecutor.INSTANCE); - serverChannelGroup = new DefaultChannelGroup("hornetq-acceptor-channels", GlobalEventExecutor.INSTANCE); + serverChannelGroup = new DefaultChannelGroup("activemq-acceptor-channels", GlobalEventExecutor.INSTANCE); SocketAddress address;