| So I found this code comment in OsgiJtaPlatform:
The Enterprise OSGi spec requires all containers to register UserTransaction and TransactionManager OSGi services.
Historically I know that we assumed an e-OSGi environment if JTA was being used. And in fact in my limited OSGi scope I thought that Aries is e-OSGi. So to me, either:
- Aries is not synonymous with e-OSGi
- Aries is synonymous with e-OSGi and that interpretation of the e-OSGi spec is inaccurate.
- Aries is synonymous with e-OSGi and that interpretation of the e-OSGi spec is accurate.
To me all of these cases come down to a RFE within Hibernate to allow OSGi environments (non-enterprise only?) to plug in a custom JtaPlatform. However, if (3) is the case I'd also consider that a problem with Aries. So, what I'd propose is a way to define a fallback JtaPlatform. Hibernate OSGi support would define OsgiJtaPlatform as the fallback. If the deployment or OSGi environment specify a custom JtaPlatform we'd use that instead. Do note however that the very design of JtaPlatform requires access to either UserTransaction or TransactionManager. It is built on top of the JTA spec/contracts, hence the name So your "Aries custom JtaPlatform impl" is still going to have to adapt your TransactionControl to either one of those. Also, I want to be clear that to me this JtaPlatform discussion is separate from the marking a transaction for rollback-only. Though obviously they are related. |