[
https://issues.jboss.org/browse/WFLY-3548?page=com.atlassian.jira.plugin....
]
Gytis Trikleris commented on WFLY-3548:
---------------------------------------
[~martinkouba], I have spend a lot of time debugging this issue today, and I think that
the problem might not be in the transactions side. I'll roughly explain what I found
bellow.
I came to this conclusion by adding break points on
org.jboss.as.ee.component.NamespaceContextInterceptor#processInvocation and
org.jboss.as.naming.InitialContext.DefaultInitialContext#findContext methods. Latter
method throws the exception in question (NameNotFoundException), if "comp"
context is not available in the context selector. While the first method is responsible
for making sure that the correct selector is created before invoking findContext method.
Problem arises in org.jboss.as.naming.context.NamespaceContextSelector class which uses
ThreadLocalStack to keep context selectors. JTA tests work fine because processInvocation
and findContext methods are always invoked on the same thread. However, if JTS is enabled
it is not always the case. Therefore, if threads are different, required context selector
is not available for findContext method, which leads to the NameNotFoundException.
Any ideas why this could happen?
JTA synchronization for a distributed transaction called with
incorrect TCCL
----------------------------------------------------------------------------
Key: WFLY-3548
URL:
https://issues.jboss.org/browse/WFLY-3548
Project: WildFly
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Transactions
Affects Versions: 8.1.0.Final
Reporter: Martin Kouba
Assignee: Gytis Trikleris
It seems the RequestProcessor which is processing JTA synchronizations
does not have the right TCCL set.
As a result, during synchronization invocation:
* {{NameNotFoundException}} is thrown for a JNDI lookup of
"java:comp/UserTransaction"
* if we try to acccess {{org.jboss.weld.Container}} by means of
{{org.jboss.as.weld.services.ModuleGroupSingletonProvider.TCCLSingleton}}, we get ISE:
"Singleton not set....This means that you are trying to access a weld deployment with
a Thread Context ClassLoader that is not associated with the deployment."
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)