JBoss Community

Re: Non-Java EE (Spring) JPA/Hibernate and native Hibernate applications in AS7

created by Scott Marlow in JBoss AS7 Development - View the full discussion

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. 

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community