code: private void prepareForReuse(boolean reuse)
      {
          if(reuse)
          {
              // using clone to avoid ConcurentModificationException
              Iterator iter = ((List) mvOrderOfIds.clone()).iterator();
              while(iter.hasNext())
              {
                  ObjectEnvelope mod = (ObjectEnvelope) mhtObjectEnvelopes.get(iter.next());
                  if(!needsCommit || (mod.getModificationState() == StateOldClean.getInstance()
                          || mod.getModificationState().isTransient()))
                  {
                      // nothing to do
                  }
                  else
                  {
                      mod.setModificationState(mod.getModificationState().markClean());
                  }
              }
          }
      }
docs: This method have to be called to reuse all registered {@link ObjectEnvelope}
  objects after transaction commit/flush/checkpoint call.