/** * @param destination * @throws JMSException */ public void deleteTempDestination(ActiveMQTempDestination destination) throws JMSException { checkClosedOrFailed(); for (ActiveMQSession session : this.sessions) { if (session.isInUse(destination)) { throw new JMSException("A consumer is consuming from the temporary destination"); } } activeTempDestinations.remove(destination); DestinationInfo destInfo = new DestinationInfo(); destInfo.setConnectionId(this.info.getConnectionId()); destInfo.setOperationType(DestinationInfo.REMOVE_OPERATION_TYPE); destInfo.setDestination(destination); destInfo.setTimeout(0); syncSendPacket(destInfo); }
/** * @param destination * @throws JMSException */ public void deleteTempDestination(ActiveMQTempDestination destination) throws JMSException { checkClosedOrFailed(); for (Iterator<ActiveMQSession> i = this.sessions.iterator(); i.hasNext();) { ActiveMQSession s = i.next(); if (s.isInUse(destination)) { throw new JMSException("A consumer is consuming from the temporary destination"); } } activeTempDestinations.remove(destination); DestinationInfo destInfo = new DestinationInfo(); destInfo.setConnectionId(this.info.getConnectionId()); destInfo.setOperationType(DestinationInfo.REMOVE_OPERATION_TYPE); destInfo.setDestination(destination); destInfo.setTimeout(0); syncSendPacket(destInfo); }
/** * @param destination * @throws JMSException */ public void deleteTempDestination(ActiveMQTempDestination destination) throws JMSException { checkClosedOrFailed(); for (ActiveMQSession session : this.sessions) { if (session.isInUse(destination)) { throw new JMSException("A consumer is consuming from the temporary destination"); } } activeTempDestinations.remove(destination); DestinationInfo destInfo = new DestinationInfo(); destInfo.setConnectionId(this.info.getConnectionId()); destInfo.setOperationType(DestinationInfo.REMOVE_OPERATION_TYPE); destInfo.setDestination(destination); destInfo.setTimeout(0); syncSendPacket(destInfo); }
/** * @param destination * @throws JMSException */ public void deleteTempDestination(ActiveMQTempDestination destination) throws JMSException { checkClosedOrFailed(); for (ActiveMQSession session : this.sessions) { if (session.isInUse(destination)) { throw new JMSException("A consumer is consuming from the temporary destination"); } } activeTempDestinations.remove(destination); DestinationInfo destInfo = new DestinationInfo(); destInfo.setConnectionId(this.info.getConnectionId()); destInfo.setOperationType(DestinationInfo.REMOVE_OPERATION_TYPE); destInfo.setDestination(destination); destInfo.setTimeout(0); syncSendPacket(destInfo); }
/** * @param destination * @throws JMSException */ public void deleteTempDestination(ActiveMQTempDestination destination) throws JMSException { checkClosedOrFailed(); for (ActiveMQSession session : this.sessions) { if (session.isInUse(destination)) { throw new JMSException("A consumer is consuming from the temporary destination"); } } activeTempDestinations.remove(destination); DestinationInfo destInfo = new DestinationInfo(); destInfo.setConnectionId(this.info.getConnectionId()); destInfo.setOperationType(DestinationInfo.REMOVE_OPERATION_TYPE); destInfo.setDestination(destination); destInfo.setTimeout(0); syncSendPacket(destInfo); }