public void removeFeatures(Filter filter) throws IOException { // this we can optimize, it's a matter of mass updating the last // revisions (and before that, we have to compute the modified envelope) Filter versionedFilter = (Filter) store.buildVersionedFilter(schema.getTypeName(), filter, new RevisionInfo()); Envelope bounds = locking .getBounds(new DefaultQuery(schema.getTypeName(), versionedFilter)); Transaction t = getTransaction(); boolean autoCommit = false; if (Transaction.AUTO_COMMIT.equals(t)) { t = new DefaultTransaction(); autoCommit = true; } VersionedJdbcTransactionState state = store.wrapped.getVersionedJdbcTransactionState(t); locking.modifyFeatures(locking.getSchema().getAttributeType("expired"), new Long(state .getRevision()), versionedFilter); if (autoCommit) { t.commit(); t.close(); } store.listenerManager.fireFeaturesRemoved(schema.getTypeName(), t, bounds, false); }