@Override
@TransactionAttribute(REQUIRES_NEW)
public void persistDriftFileData(JPADriftFile driftFile, InputStream data, long numBytes) throws Exception {
JPADriftFileBits df = entityManager.find(JPADriftFileBits.class, driftFile.getHashId());
if (null == df) {
throw new IllegalArgumentException("JPADriftFile not found [" + driftFile.getHashId() + "]");
}
Session session = (Session)entityManager.getDelegate();
df.setDataSize(numBytes);
df.setData(session.getLobHelper().createBlob(new BufferedInputStream(data), numBytes));
df.setStatus(LOADED);
}