[
https://issues.jboss.org/browse/WFLY-8661?page=com.atlassian.jira.plugin....
]
Scott Marlow commented on WFLY-8661:
------------------------------------
[~dmlloyd] I tried the "counter" change last night but noticed that the
notifyAssociationListeners() call only is happening from the TM reaper (timeout) thread
but not the application thread. For the TM Reaper thread, we seem to reach the path of
handling "whileSuspended/whileResumed" in
org.wildfly.transaction.client.AbstractTransaction.performConsumer(ExceptionObjIntConsumer<T,
E> consumer, T param1, int param2) but don't seem to reach that method at all in
the application thread once the TM Reaper thread reaches
AbstractTransaction.performConsumer.
I expect that the application thread will disassociate itself from the transaction, at
which time I will decrement the jpa container counter but the association listener is not
getting called back it seems after the TM reaper thread cancels the transaction.
Also, when the JPA container calls transaction.registerAssociationListener(), should I
start the counter at one, or should I expect the association listener to be called
immediately, to reflect the current active transaction that is already associated with the
application thread? For now, I am starting the counter at one but we should agree on what
should happen, so that the jpa counter starts at the correct value.
Transaction is marked disassociated from application thread when
transaction manager reaper thread suspends transaction
-----------------------------------------------------------------------------------------------------------------------
Key: WFLY-8661
URL:
https://issues.jboss.org/browse/WFLY-8661
Project: WildFly
Issue Type: Bug
Components: JPA / Hibernate
Affects Versions: 11.0.0.Alpha1
Reporter: Scott Marlow
Assignee: Scott Marlow
I created a pull request to enable the TxTimeoutTestCase ([JBEAP-10550] + [WFLY-5319])
which required a test change, however, the test is failing for me locally, due to
org.wildfly.transaction.client.LocalTransaction.suspend() calling
notifyAssociationListeners(false) in the TM reaper "tx timeout" thread, which is
wrong, as the app client thread may still be associated with the same transaction.
[
https://gist.github.com/scottmarlow/1ae4a4abe98851b3fe6b1e602ba273d7] shows another
reaper thread association call being made, that shouldn't be.
I'm not sure of how the Narayana org.jboss.tm.listener.TransactionListenerRegistry
SPI, internally ensured that the reaper thread didn't incorrectly perform
association/disassociation but what we have now in WildFly (appears) to be different.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)