@Override void apply(MessageProducer producer, Destination destination, Message message) throws JMSException { ((TopicPublisher) producer).publish((Topic) destination, message); } };
@Override protected synchronized void sendMessage(Message message) throws JMSException { if (producer == null && createProducer() == null) { throw new JMSException("Producer for remote queue not available."); } try { producer.publish(producerTopic, message); } catch (JMSException e) { producer = null; throw e; } }
/** Sends a request and waits for a reply. The temporary topic is used for * the {@code JMSReplyTo} destination; the first reply is returned, * and any following replies are discarded. * * @param message the message to send * * @return the reply message * * @exception JMSException if the JMS provider fails to complete the * request due to some internal error. */ public Message request(Message message) throws JMSException { message.setJMSReplyTo(tempTopic); publisher.publish(message); return(subscriber.receive()); }
/** This method called by {@link AppenderSkeleton#doAppend} method to do most of the real appending work. */ public void append(LoggingEvent event) { if(!checkEntryConditions()) { return; } try { ObjectMessage msg = topicSession.createObjectMessage(); if(locationInfo) { event.getLocationInformation(); } msg.setObject(event); topicPublisher.publish(msg); } catch(JMSException e) { errorHandler.error("Could not publish message in JMSAppender ["+name+"].", e, ErrorCode.GENERIC_FAILURE); } catch(RuntimeException e) { errorHandler.error("Could not publish message in JMSAppender ["+name+"].", e, ErrorCode.GENERIC_FAILURE); } }
@Override public void publish(Message message) throws JMSException { checkTopicPublisher(); TopicPublisher tp = (TopicPublisher) delegate; Span span = createAndStartProducerSpan(null, message); SpanInScope ws = tracer.withSpanInScope(span); // animal-sniffer mistakes this for AutoCloseable try { tp.publish(message); } catch (RuntimeException | JMSException | Error e) { span.error(e); throw e; } finally { ws.close(); span.finish(); } }
@Override public void publish(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException { checkTopicPublisher(); TopicPublisher tp = (TopicPublisher) delegate; Span span = createAndStartProducerSpan(null, message); SpanInScope ws = tracer.withSpanInScope(span); // animal-sniffer mistakes this for AutoCloseable try { tp.publish(message, deliveryMode, priority, timeToLive); } catch (RuntimeException | JMSException | Error e) { span.error(e); throw e; } finally { ws.close(); span.finish(); } }
@Override public void publish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException { checkTopicPublisher(); TopicPublisher tp = (TopicPublisher) delegate; Span span = createAndStartProducerSpan(null, message); SpanInScope ws = tracer.withSpanInScope(span); // animal-sniffer mistakes this for AutoCloseable try { tp.publish(topic, message, deliveryMode, priority, timeToLive); } catch (RuntimeException | JMSException | Error e) { span.error(e); throw e; } finally { ws.close(); span.finish(); } }
publisher.publish(msg); } catch (final Exception e) { throw new JobExecutionException(e);
public Message request(Message message) throws JMSException { message.setJMSReplyTo(getTemporaryTopic()); getPublisher().publish(message); return (getSubscriber().receive()); }
/** * This method called by {@link AppenderBase#doAppend} method to do most * of the real appending work. */ public void append(ILoggingEvent event) { if (!isStarted()) { return; } try { ObjectMessage msg = topicSession.createObjectMessage(); Serializable so = pst.transform(event); msg.setObject(so); topicPublisher.publish(msg); successiveFailureCount = 0; } catch (Exception e) { successiveFailureCount++; if (successiveFailureCount > SUCCESSIVE_FAILURE_LIMIT) { stop(); } addError("Could not publish message in JMSTopicAppender [" + name + "].", e); } }
/** This method called by {@link AppenderSkeleton#doAppend} method to do most of the real appending work. */ public void append(LoggingEvent event) { if(!checkEntryConditions()) { return; } try { ObjectMessage msg = topicSession.createObjectMessage(); if(locationInfo) { event.getLocationInformation(); } msg.setObject(event); topicPublisher.publish(msg); } catch(JMSException e) { errorHandler.error("Could not publish message in JMSAppender ["+name+"].", e, ErrorCode.GENERIC_FAILURE); } catch(RuntimeException e) { errorHandler.error("Could not publish message in JMSAppender ["+name+"].", e, ErrorCode.GENERIC_FAILURE); } }
protected void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException { ((TopicPublisher)m_producer).publish((Topic)destination, message, deliveryMode, priority, timeToLive); }
/** * @see ca.uhn.hl7v2.protocol.JMSDestination#send(javax.jms.Message) */ public void send(Message theMessage) throws JMSException { myPublisher.publish(theMessage); }
public void publish(final Message message, final int i, final int i1, final long l) throws JMSException { getTopicPublisher().publish(message, i, i1, l); }
@Override protected synchronized void sendMessage(Message message) throws JMSException { if (producer == null && createProducer() == null) { throw new JMSException("Producer for remote queue not available."); } try { producer.publish(producerTopic, message); } catch (JMSException e) { producer = null; throw e; } }
@Override protected synchronized void sendMessage(Message message) throws JMSException { if (producer == null && createProducer() == null) { throw new JMSException("Producer for remote queue not available."); } try { producer.publish(producerTopic, message); } catch (JMSException e) { producer = null; throw e; } }
public Message request(Message message) throws JMSException { message.setJMSReplyTo(responseTopic); requestPublisher.publish(message); return responseSubscriber.receive(); }
protected void sendNotification(ClusterNotification message) { try { ObjectMessage objectMessage = publisherSession.createObjectMessage(); objectMessage.setObject(message); //sign the message, with the name of this node objectMessage.setStringProperty("nodeName", clusterNode); publisher.publish(objectMessage); } catch (JMSException e) { log.error("Cannot send notification " + message, e); } } }
public Message request(Message message) throws JMSException { message.setJMSReplyTo(getTemporaryTopic()); getPublisher().publish(message); return (getSubscriber().receive()); }
public Message request(Message message) throws JMSException { message.setJMSReplyTo(getTemporaryTopic()); getPublisher().publish(message); return (getSubscriber().receive()); }