[ 
https://issues.apache.org/jira/browse/TOMEE-4447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla closed TOMEE-4447.
----------------------------------
    Fix Version/s: 10.0.1
       Resolution: Fixed

> TomEE incorrectly propagates transaction for CDI Async Events
> -------------------------------------------------------------
>
>                 Key: TOMEE-4447
>                 URL: https://issues.apache.org/jira/browse/TOMEE-4447
>             Project: TomEE
>          Issue Type: Bug
>            Reporter: Jonathan Gallimore
>            Assignee: Jonathan Gallimore
>            Priority: Major
>             Fix For: 10.0.1
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Propagating the transaction, which has potentially finished, can result in 
> either:
>  
> Caused by: org.apache.openejb.OpenEJBRuntimeException: 
> jakarta.transaction.InvalidTransactionException: Cannot resume invalid 
> transaction: 
> [org.apache.geronimo.transaction.manager.TransactionImpl@fef5d05b|mailto:org.apache.geronimo.transaction.manager.TransactionImpl@fef5d05b]
>         at 
> org.apache.openejb.threads.impl.TxThreadContextProvider$TxThreadContextRestoringSnapshot.begin(TxThreadContextProvider.java:90)
>         at 
> org.apache.openejb.threads.impl.ContextServiceImpl.enter(ContextServiceImpl.java:210)
>         ... 3 more
> Caused by: jakarta.transaction.InvalidTransactionException: Cannot resume 
> invalid transaction: 
> [org.apache.geronimo.transaction.manager.TransactionImpl@fef5d05b|mailto:org.apache.geronimo.transaction.manager.TransactionImpl@fef5d05b]
>         at 
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.associate(TransactionManagerImpl.java:125)
>         at 
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.resume(TransactionManagerImpl.java:201)
>         at 
> org.apache.openejb.threads.impl.TxThreadContextProvider$TxThreadContextRestoringSnapshot.begin(TxThreadContextProvider.java:87)
>         ... 4 more
>  
> or
>  
> Caused by: org.apache.openejb.OpenEJBRuntimeException: 
> jakarta.transaction.InvalidTransactionException: Specified transaction is 
> already associated with another thread
> at 
> org.apache.openejb.threads.impl.TxThreadContextProvider$TxThreadContextRestoringSnapshot.begin(TxThreadContextProvider.java:90)
> at 
> org.apache.openejb.threads.impl.ContextServiceImpl.enter(ContextServiceImpl.java:210)
> … 3 more
> Caused by: jakarta.transaction.InvalidTransactionException: Specified 
> transaction is already associated with another thread
> at 
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.associate(TransactionManagerImpl.java:129)
> at 
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.resume(TransactionManagerImpl.java:201)
> at 
> org.apache.openejb.threads.impl.TxThreadContextProvider$TxThreadContextRestoringSnapshot.begin(TxThreadContextProvider.java:87)
> … 4 more
>  
> Section 2.8.4 of the spec 
> ([https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.pdf)] states:
> "Asynchronous observer cannot be declared transactional.", so it doesn't make 
> sense to propagate the transaction here.
> TomEE 9.x didn't propagate the transaction in this use case either.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to