Search in sources :

Example 6 with AMQConnectionContext

use of org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConnectionContext in project activemq-artemis by apache.

the class OpenWireConnection method tempQueueDeleted.

@Override
public void tempQueueDeleted(SimpleString bindingName) {
    ActiveMQDestination dest = new ActiveMQTempQueue(bindingName.toString());
    state.removeTempDestination(dest);
    if (!AdvisorySupport.isAdvisoryTopic(dest)) {
        AMQConnectionContext context = getContext();
        DestinationInfo advInfo = new DestinationInfo(context.getConnectionId(), DestinationInfo.REMOVE_OPERATION_TYPE, dest);
        ActiveMQTopic topic = AdvisorySupport.getDestinationAdvisoryTopic(dest);
        try {
            protocolManager.fireAdvisory(context, topic, advInfo);
        } catch (Exception e) {
            logger.warn("Failed to fire advisory on " + topic, e);
        }
    }
}
Also used : DestinationInfo(org.apache.activemq.command.DestinationInfo) ActiveMQTopic(org.apache.activemq.command.ActiveMQTopic) AMQConnectionContext(org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConnectionContext) ActiveMQTempQueue(org.apache.activemq.command.ActiveMQTempQueue) ActiveMQException(org.apache.activemq.artemis.api.core.ActiveMQException) ActiveMQRemoteDisconnectException(org.apache.activemq.artemis.api.core.ActiveMQRemoteDisconnectException) IllegalStateException(javax.jms.IllegalStateException) XAException(javax.transaction.xa.XAException) InvalidDestinationException(javax.jms.InvalidDestinationException) ActiveMQNonExistentQueueException(org.apache.activemq.artemis.api.core.ActiveMQNonExistentQueueException) IOException(java.io.IOException) ActiveMQAddressExistsException(org.apache.activemq.artemis.api.core.ActiveMQAddressExistsException) ActiveMQSecurityException(org.apache.activemq.artemis.api.core.ActiveMQSecurityException) JMSSecurityException(javax.jms.JMSSecurityException) ActiveMQQueueExistsException(org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException) InvalidClientIDException(javax.jms.InvalidClientIDException) ActiveMQDestination(org.apache.activemq.command.ActiveMQDestination)

Aggregations

AMQConnectionContext (org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConnectionContext)6 SimpleString (org.apache.activemq.artemis.api.core.SimpleString)5 InvalidClientIDException (javax.jms.InvalidClientIDException)4 ActiveMQTopic (org.apache.activemq.command.ActiveMQTopic)4 ActiveMQAddressExistsException (org.apache.activemq.artemis.api.core.ActiveMQAddressExistsException)3 ActiveMQQueueExistsException (org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException)3 ActiveMQSecurityException (org.apache.activemq.artemis.api.core.ActiveMQSecurityException)3 DestinationInfo (org.apache.activemq.command.DestinationInfo)3 IOException (java.io.IOException)2 IllegalStateException (javax.jms.IllegalStateException)2 InvalidDestinationException (javax.jms.InvalidDestinationException)2 JMSSecurityException (javax.jms.JMSSecurityException)2 XAException (javax.transaction.xa.XAException)2 ActiveMQException (org.apache.activemq.artemis.api.core.ActiveMQException)2 ActiveMQNonExistentQueueException (org.apache.activemq.artemis.api.core.ActiveMQNonExistentQueueException)2 ActiveMQRemoteDisconnectException (org.apache.activemq.artemis.api.core.ActiveMQRemoteDisconnectException)2 ActiveMQDestination (org.apache.activemq.command.ActiveMQDestination)2 ActiveMQTempQueue (org.apache.activemq.command.ActiveMQTempQueue)2 Binding (org.apache.activemq.artemis.core.postoffice.Binding)1 Bindings (org.apache.activemq.artemis.core.postoffice.Bindings)1