@Override public boolean load(Element shared, Element perNode) throws Exception { boolean result = true; getInstance(); // configure port name String portName = shared.getAttribute("port").getValue(); adapter.setPort(portName); String baudRate = shared.getAttribute("speed").getValue(); adapter.configureBaudRate(baudRate); loadCommon(shared, adapter); // register, so can be picked up next time register(); // try to open the port if (adapter.getDisabled()) { unpackElement(shared); return result; } String status = adapter.openPort(portName, "JMRI app"); if (status != null) { // indicates an error, return it ConfigXmlManager.creationErrorEncountered( null, "opening connection", status, null, null, null); // now force end to operation return false; } // if successful so far, go ahead and configure adapter.configure(); // once all the configure processing has happened, do any // extra config unpackElement(shared); return result; }