Open hantsy opened 3 years ago
Thank you for your suggestion! Unfortunately I am not too clear on what you are suggesting to be added to the Jakarta Transactions project to accomplish the suggestion - please can you elaborate on what the change would look like from the Jakarta Transactions api/specification point of view?
@tomjenkinson I would like to port the TransactionStrategy
of Apache DeltaSpike to Jakarta EE, and make CDI compatible @Transactional
annotation(declaration approache) and UserTransaction
(or something new class for programmatic approach) works with JTA or local transaction(non-JTA).
For example, in a servlet container, there is a DataSource CDI bean declared, create a local DataSource based transaction strategy, and developers can use @Transactional
directly(Currently it does not work in this case).
+1, really a important feature when just using CDI + JPA
Thank you for providing feedback, please can I suggest to create a discussion on the Jakarta Transactions developer mailing list: https://accounts.eclipse.org/mailing-list/jta-dev ?
Like Spring, in a none-EJB and none-JTA,
@Transactional
should support JPARESOURCE_LOCAL
type persistence context seamlessly in a CDI SE and Servlet/CDI environment.Besides, add possible to configure transaction support(
@Trasnactional
) fromDataSource
for JDBC scenes. Like the SpringDataSource
andDataSourceTransactionManager
.I think the Apache DeltaSpike project has done some work like this in the past years. https://deltaspike.apache.org/documentation/data.html#Transactions
Related to https://github.com/eclipse-ee4j/jpa-api/issues/309.