[
https://issues.jboss.org/browse/JBTM-3131?page=com.atlassian.jira.plugin....
]
Laird Nelson updated JBTM-3131:
-------------------------------
Description:
For background, see
https://github.com/jbosstm/narayana/pull/1403#issuecomment-479495649
and following.
Briefly, in the CDI integration area of {{ArjunaJTA/cdi}}, {{JNDIBean}} attempts to create
an {{InitialContext}}. In application server scenarios, the relevant metadata to permit
this to happen will exist, and there won't be any issues (so Wildfly etc. are fine
here). In CDI SE, it is possible that such metadata _won't_ exist, and a
{{NoInitialContextException}} will be thrown.
{{NarayanaTransactionManager}} uses a similar strategy, but correctly prevents
{{NoInitialContextExceptions}} from being thrown
(
https://github.com/jbosstm/narayana/blob/54b60a4db37ca859b9742d5f6f25cc82...).
The proper solution is to ensure that a {{TransactionSynchronizationRegistry}} bean is set
up in a similar manner to {{NarayanaTransactionManager}}.
I'll have a pull request to fix this shortly.
was:
For background, see
https://github.com/jbosstm/narayana/pull/1403#issuecomment-479495649
and following.
Briefly, in the CDI integration area of {{ArjunaJTA/cdi}}, {{JNDIBean}} attempts to create
an {{InitialContext}}. In application server scenarios, the relevant metadata to permit
this to happen will exist, and there won't be any issues (so Wildfly etc. are fine
here). In CDI SE, it is possible that such metadata _won't_ exist, and a
{{NoInitialContextException}} will be thrown.
{{NarayanaTransactionManager}} uses a similar strategy, but correctly prevents
{{NoInitialContextExceptions}} from being thrown
(
https://github.com/jbosstm/narayana/blob/54b60a4db37ca859b9742d5f6f25cc82...).
A similar strategy needs to happen in {{JNDIBean}}.
I'll have a pull request to fix this shortly.
Summary: JNDIBean's create() method can fail with NoInitialContextException
(was: JNDIBean does not explicitly catch NoInitialContextException)
JNDIBean's create() method can fail with
NoInitialContextException
------------------------------------------------------------------
Key: JBTM-3131
URL:
https://issues.jboss.org/browse/JBTM-3131
Project: JBoss Transaction Manager
Issue Type: Bug
Components: JTA
Affects Versions: 5.9.5.Final
Reporter: Laird Nelson
Priority: Major
For background, see
https://github.com/jbosstm/narayana/pull/1403#issuecomment-479495649
and following.
Briefly, in the CDI integration area of {{ArjunaJTA/cdi}}, {{JNDIBean}} attempts to
create an {{InitialContext}}. In application server scenarios, the relevant metadata to
permit this to happen will exist, and there won't be any issues (so Wildfly etc. are
fine here). In CDI SE, it is possible that such metadata _won't_ exist, and a
{{NoInitialContextException}} will be thrown.
{{NarayanaTransactionManager}} uses a similar strategy, but correctly prevents
{{NoInitialContextExceptions}} from being thrown
(
https://github.com/jbosstm/narayana/blob/54b60a4db37ca859b9742d5f6f25cc82...).
The proper solution is to ensure that a {{TransactionSynchronizationRegistry}} bean is
set up in a similar manner to {{NarayanaTransactionManager}}.
I'll have a pull request to fix this shortly.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)