private void updateBlobs(final boolean isDispose) {
final Set<HasBlob<?>> updates = (Set<HasBlob<?>>) env.get(HasBlob.GORM_UPDATE_SET);
configureEnvironment();
Session session = GrailsIntegration.getCurrentSession();
session.doWork(new Work() {
@Override
public void execute(Connection conn) throws SQLException {
boolean hasStoredKSession = false;
for (final HasBlob<?> hasBlob : updates) {
if (!hasBlob.isDeleted()) {