/** * Saves the object state on persistent storage. */ void save() throws IOException { if (isPersistent()) { AgentServer.getTransaction().create(this, toStringId()); if (not.detachable) { not.messageId = StringId.toStringId('N', '_', dest, stamp, -1); AgentServer.getTransaction().create(not, not.messageId); } } }
/** * Saves the object state on persistent storage. */ void save() throws IOException { if (isPersistent()) { AgentServer.getTransaction().create(this, toStringId()); if (not.detachable) { not.messageId = StringId.toStringId('N', '_', dest, stamp, -1); AgentServer.getTransaction().create(not, not.messageId); } } }
public void saveHeader() { if (logger.isLoggable(BasicLevel.DEBUG)) logger.log(BasicLevel.DEBUG, "Message.saveHeader:" + txname); if (!isPersistent()) return; if (soft) { byte[] body = msg.body; // sets the body to null to not save it msg.body = null; try { AgentServer.getTransaction().create(this, txname); } catch (IOException exc) { logger.log(BasicLevel.ERROR, "Message named [" + txname + "] could not be saved", exc); } msg.body = body; } else { save(); } }
public void save() { if (logger.isLoggable(BasicLevel.DEBUG)) logger.log(BasicLevel.DEBUG, "Message.save:" + txname); if (!isPersistent()) return; if (soft) { byte[] body = msg.body; // sets the body to null to save it in an other file msg.body = null; try { AgentServer.getTransaction().create(this, txname); } catch (IOException exc) { logger.log(BasicLevel.ERROR, "Message named [" + txname + "] could not be saved", exc); } // save the body try { // The body is RO do not copy it. AgentServer.getTransaction().saveByteArray(body, null, txname + "B", false, true); } catch (IOException exc) { logger.log(BasicLevel.ERROR, "Message named [" + txname + "] could not be saved", exc); } msg.body = body; } else { try { AgentServer.getTransaction().create(this, txname); } catch (IOException exc) { logger.log(BasicLevel.ERROR, "Message named [" + txname + "] could not be saved", exc); } } }
AgentServer.getTransaction().create(this, txname); } catch (IOException exc) { logger.log(BasicLevel.ERROR, "Message named [" + txname + "] could not be saved", exc); } else { try { AgentServer.getTransaction().create(this, txname); } catch (IOException exc) { logger.log(BasicLevel.ERROR, "Message named [" + txname + "] could not be saved", exc);