for (Map.Entry<String, PersistentSession> sessionEntry : sessionData.entrySet()) {
Map<String, byte[]> data = new HashMap<String, byte[]>();
for (Map.Entry<String, Object> sessionAttribute : sessionEntry.getValue().getSessionData().entrySet()) {
try {
final ByteArrayOutputStream out = new ByteArrayOutputStream();
marshaller.start(new OutputStreamByteOutput(out));
marshaller.writeObject(sessionAttribute.getValue());
marshaller.finish();
data.put(sessionAttribute.getKey(), out.toByteArray());
} catch (Exception e) {
UndertowLogger.ROOT_LOGGER.failedToPersistSessionAttribute(sessionAttribute.getKey(), sessionAttribute.getValue(), sessionEntry.getKey(), e);