public Object deserialize(byte[] data) {
try {
ByteArrayInputStream bais = new ByteArrayInputStream(data);
Collection<JavaEEObjectStreamHandler> handlers = new ArrayList<>();
handlers.add(getHandler());
JavaEEObjectInputStream q = new JavaEEObjectInputStream(bais,
getClass().getClassLoader(), true, handlers);
return q.readObject();
} catch (Exception e) {
LOG.warn(
"Caught Exception attempting to deserialize. Falling Back\n {} ",
e);
return fallback.deserialize(data);