protected void saveExpression (final String fileName, final FlowExpression fe) throws Exception { XmlBeanCoder.save(fileName, fe); }
/** * Saving a bean / instance to a file */ public static void save (final String fileName, final Object bean) { java.io.FileOutputStream fos = null; try { fos = new java.io.FileOutputStream(fileName); save(fos, bean); } catch (final Throwable t) { log.error ("save() failed to open outputstream to file "+fileName, t); } }
private void saveState () { log.debug("saveState()"); final java.util.Map state = new java.util.HashMap(2); state.put("masters", this.masters); state.put("slaves", this.slaves); try { XmlBeanCoder.save(this.cacheFileName, state); } catch (final Exception e) { log.warn ("saveState() failed to save state. "+ "Will lose it at system shutdown.", e); } }