}
}
@Override
protected void storeSaga(Saga saga) {
SagaEntry entry = new SagaEntry(saga, serializer);
if (logger.isDebugEnabled()) {
logger.debug("Storing saga id {} as {}", saga.getSagaIdentifier(), new String(entry.getSerializedSaga(),
Charset.forName("UTF-8")));
}
Connection conn = null;
PreparedStatement statement = null;
try {
conn = connectionProvider.getConnection();
statement = sqldef.sql_storeSaga(conn, entry.getSagaId(), entry.getRevision(), entry.getSagaType(),
entry.getSerializedSaga());
statement.executeUpdate();
} catch (SQLException e) {
throw new SagaStorageException("Exception occurred while attempting to store a Saga Entry", e);
} finally {
closeQuietly(statement);