for (CachePeer cachePeer : listRemoteCachePeers(eventMessages.get(0).getEhcache())) { try { cachePeer.send(eventMessages); } catch (UnmarshalException e) { String message = e.getMessage();
/** * Used to send notification to the peer. If Async this method simply add * the element to the replication queue. If not async, searches for the * cachePeer and send the Message. That way the class handles both async and * sync replication Sending is delegated to the peer (of type JGroupsCacheManagerPeerProvider) * * @param cache * @param eventMessage */ protected void sendNotification(Ehcache cache, JGroupEventMessage eventMessage) { final List<CachePeer> peers = this.listRemoteCachePeers(cache); for (final CachePeer peer : peers) { try { peer.send(Arrays.asList(eventMessage)); } catch (RemoteException e) { LOG.warn("Failed to send message '" + eventMessage + "' to peer '" + peer + "'", e); } } }
for (CachePeer peer : cachePeers) { try { peer.send(messages); } catch (RemoteException e) { LOG.warning("Unable to send message to remote peer. Message was: " + e.getMessage() + " Continuing to send" +
for (CachePeer peer : cachePeers) { try { peer.send(messages); } catch (RemoteException e) { LOG.warning("Unable to send message to remote peer. Message was: " + e.getMessage() + " continuing to send" +
for (CachePeer cachePeer : listRemoteCachePeers(eventMessages.get(0).getEhcache())) { try { cachePeer.send(eventMessages); } catch (UnmarshalException e) { String message = e.getMessage();
for (CachePeer cachePeer : listRemoteCachePeers(eventMessages.get(0).getEhcache())) { try { cachePeer.send(eventMessages); } catch (UnmarshalException e) { String message = e.getMessage();
/** * Sends the message * * @param cache * @param message */ protected void sendNotification(Ehcache cache, JMSEventMessage message) { if (LOG.isLoggable(Level.FINEST)) { LOG.finest("sendNotification ( " + message.toString() + " )"); } if (replicateAsync) { addMessageToQueue(cache, message); return; } List<EventMessage> messages = new ArrayList<EventMessage>(); messages.add(message); //Is only ever one for JMS in the current implementation for (CachePeer peer : listRemoteCachePeers(cache)) { try { peer.send(messages); } catch (RemoteException e) { throw new CacheException(e); } } }
for (CachePeer cachePeer : listRemoteCachePeers(eventMessages.get(0).getEhcache())) { try { cachePeer.send(eventMessages); } catch (UnmarshalException e) { String message = e.getMessage();
/** * Sends the message * * @param cache * @param message */ protected void sendNotification(Ehcache cache, JMSEventMessage message) { if (LOG.isLoggable(Level.FINEST)) { LOG.finest("sendNotification ( " + message.toString() + " )"); } if (replicateAsync) { addMessageToQueue(cache, message); return; } List<EventMessage> messages = new ArrayList<EventMessage>(); messages.add(message); //Is only ever one for JMS in the current implementation for (CachePeer peer : listRemoteCachePeers(cache)) { try { peer.send(messages); } catch (RemoteException e) { throw new CacheException(e); } } }