jakartaee / persistence

https://jakartaee.github.io/persistence/
Other
203 stars 59 forks source link

deprecate PersistenceUnitTransactionType #477

Closed gavinking closed 1 year ago

gavinking commented 1 year ago

After #465 we have the API PersistenceTransactionType and the SPI PersistenceUnitTransactionType.

We can deprecate PersistenceUnitTransactionType for removal.

gavinking commented 1 year ago

@lukasj Two questions:

  1. should we add EntityManagerFactory.getTransactionType()?
  2. should we rename this enum to the overly-verbose-but-more-precise PersistenceTransactionManagementType?
gavinking commented 1 year ago

Or just PersistenceTransactionManagement?

hantsy commented 1 year ago

PersistenceTransactionType is ok, but it seems txType attribute of @Transactional() is not a good naming, will confuse developers. The Spring @Transactional propagation is more reasonable.

gavinking commented 1 year ago

@hantsy I agree, I don't like Transactional.TxType at all, neither its name, nor the fact that it's an inner enum of an annotation. I would have liked to be able to reuse it in #410. But for those reasons, and because Lukas doesn't want a direct dependency to the JTA module, we're not going to use it, and we're just going to live with REQUIRED semantics.