use of org.jboss.narayana.rest.integration.api.ParticipantDeserializer in project narayana by jbosstm.
the class RecoveryManager method recreateParticipant.
private Participant recreateParticipant(final InputObjectState inputObjectState, final String applicationId) throws IOException {
final ParticipantDeserializer deserializer = deserializers.get(applicationId);
final byte[] participantBytes = inputObjectState.unpackBytes();
Participant participant = deserializer.recreate(participantBytes);
if (participant == null) {
final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(participantBytes);
final ObjectInputStream objectInputStream = new ObjectInputStream(byteArrayInputStream);
participant = deserializer.deserialize(objectInputStream);
}
return participant;
}
Aggregations