Pros of a custom "version" property:
- It is configured in the same file as the persistence provider (easier to use if configured in one place)
- Different versions of the provider could be used from the same app (its arguable whether this is a safe practice, could be too much rope)
Cons: of a custom "version property:
- Duplicates what could already be done at the deployment level (via jboss-deployment-structure.xml)
- Ensuring the version property resolves to a valid persistence provider could be a pain. A module reference is less likely to be wrong.
- Updating a production application persistence.xml might not be allowable. It might be safer to just update the jboss-deployment-structure module references.
Seems to me that either way could work, but point taken.