/** * Expose the message batch to a queue or topic. * * @param destinationIdentifier destination identifier * @param tracker messages to expose */ private void exposeQueueMessageBatch(Identifier destinationIdentifier, MessageTracker tracker) { NamedCache destinations = CacheFactory.getCache(Destination.CACHENAME); destinations.invoke(destinationIdentifier, new ExposeMessageToQueueProcessor(tracker)); ArrayList<MessageKey> messageKeys = tracker.getMessageKeys(destinationIdentifier); CacheFactory.getCache(Message.CACHENAME).invokeAll(messageKeys, new UpdaterProcessor("setVisible", Boolean.TRUE)); }