Use of sequences

I need to emulate a serial auto-increment property, and found that OrientDB supports sequences. According to this post I can use them in Java in this manner:

OrientGraph graphDB = ...
OSequence seq = graphDB.getRawGraph().getMetadata().getSequenceLibrary().getSequence("the_seq");
graphDB.addVertex("class:MyClass", "val", seq.next());

But if I cancel the transaction, and don’t persist the vertex, the sequence is already changed. Is there a way to use a sequence only in the “insert”/“create vertex” action but from Java API?

Second, if instead of “val” I use a property called “id”, the “addVertex” function fails telling that the name “id” is reserved… Nevertheless I can use an “id” property without problems with SQL…