/** * @return * @throws JMSException */ public ObjectMessage createObjectMessage() throws JMSException { return next.createObjectMessage(); }
/** * @param object * @return * @throws JMSException */ public ObjectMessage createObjectMessage(Serializable object) throws JMSException { return next.createObjectMessage(object); }
/** 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); } }
/** 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); } }
/** * 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); } }
/** * @return * @throws JMSException */ public ObjectMessage createObjectMessage() throws JMSException { return next.createObjectMessage(); }
/** * Returns a new {@link Message} to send to the topic. This * implementation creates an {@link ObjectMessage}. */ protected Message createMessage(RemoteCommitEvent event) throws JMSException { return _session.createObjectMessage(event); }
/** * Returns a new {@link Message} to send to the topic. This * implementation creates an {@link ObjectMessage}. */ protected Message createMessage(RemoteCommitEvent event) throws JMSException { return _session.createObjectMessage(event); }
/** * @return * @throws JMSException */ public ObjectMessage createObjectMessage() throws JMSException { return next.createObjectMessage(); }
/** * @param object * @return * @throws JMSException */ public ObjectMessage createObjectMessage(Serializable object) throws JMSException { return next.createObjectMessage(object); }
/** * @param object * @return * @throws JMSException */ public ObjectMessage createObjectMessage(Serializable object) throws JMSException { return next.createObjectMessage(object); }
/** * @param object * @return * @throws JMSException */ public ObjectMessage createObjectMessage(Serializable object) throws JMSException { return next.createObjectMessage(object); }
/** * @return * @throws JMSException */ public ObjectMessage createObjectMessage() throws JMSException { return next.createObjectMessage(); }
/** * @param object * @return * @throws JMSException */ public ObjectMessage createObjectMessage(Serializable object) throws JMSException { return next.createObjectMessage(object); }
/** * @return * @throws JMSException */ public ObjectMessage createObjectMessage() throws JMSException { return next.createObjectMessage(); }
/** * Returns a new {@link Message} to send to the topic. This * implementation creates an {@link ObjectMessage}. */ protected Message createMessage(RemoteCommitEvent event) throws JMSException { return _session.createObjectMessage(event); }
/** * Returns a new {@link Message} to send to the topic. This * implementation creates an {@link ObjectMessage}. */ protected Message createMessage(RemoteCommitEvent event) throws JMSException { return _session.createObjectMessage(event); }
/** * Returns a new {@link Message} to send to the topic. This * implementation creates an {@link ObjectMessage}. */ protected Message createMessage(RemoteCommitEvent event) throws JMSException { return _session.createObjectMessage(event); }
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); } } }
protected void sendExternalEvent(CayenneEvent localEvent) throws Exception { ObjectMessage message = sendSession .createObjectMessage(eventToMessageObject(localEvent)); message.setObjectProperty(JMSBridge.VM_ID_PROPERRTY, JMSBridge.VM_ID); publisher.publish(message); }