* @see hermes.HermesRepository#addMessages(java.lang.String,
* java.util.Collection)
*/
public void addMessages(Hermes hermes, Collection messages) throws JMSException {
if (hermes == null) {
throw new HermesException("No Hermes available");
}
try {
if (xmlMessages == null) {
read();
}
MessageSet newMessages = xmlSupport.toMessageSet(messages);
xmlMessages.getEntry().addAll(newMessages.getEntry());
save();
} catch (JMSException e) {
throw e; // Ugh.
} catch (Exception e) {
throw new HermesException(e);
}
}