Markus Jung created TOMEE-4711:
----------------------------------
Summary: Jakarta Data repositories fail when called from a
@Transactional CDI method
Key: TOMEE-4711
URL: https://issues.apache.org/jira/browse/TOMEE-4711
Project: TomEE
Issue Type: Bug
Reporter: Markus Jung
{{RepositoryInvocationHandler.executeInTransaction}} looks up
{{java:comp/UserTransaction}} and calls {{getStatus()}} on every repository
invocation to decide whether to start a transaction.
JTA forbids {{UserTransaction}} use inside a {{@Transactional}} method (TxType
other than {{NOT_SUPPORTED}}/{{NEVER}}), and TomEE's interceptor enforces that.
So any repository call from such a method fails with:
{code}java.lang.IllegalStateException: Can't use UserTransaction from
@Transactional call
{code}
The handler should use the container {{TransactionManager}} instead, which is
not subject to that restriction.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)