Ok, I guess I've found what I've been looking for:
But that means I have to create/implement a revision entity before I can access the revision? Or can I simply use:
So after I persist() my entites via EntityManager, I call the above method with getCurrentRevision(DefaultRevisionEntity.class, false) and I can
get the created revisionId from the returned object?
What about the RevisionListener. If it gets invoked, does the revision entity passed to it already contain the current revision or will it be set later by Envers?
This isn't quite clear in the docs.
You can use the DefaultRevisionEntity.
In the revision listener, the id won't be yet available.