4

In Wildfly 10: Why do I have two different jndi naming conventions for java:jboss/UserTransaction and java:/TransactionManager. looked on UserTransaction: javax.naming.NameNotFoundException after Migration to WildFly 8.2.0 and Java 8

and it has made me more confused. If it is not a part of Wild fly anymore then i should need to provide there java:jboss/UserTransaction as compared to java:/TransactionManager which is provided by Wildfly internally.

This is a question out of curiosity. because when using JNDI names java:/TransactionManager and java:jboss/UserTransaction, they work. If i make it java:/UserTransaction then it doesnot.

Community
  • 1
  • 1
sarmahdi
  • 1,098
  • 4
  • 21
  • 61

1 Answers1

0

You should use java:/TransactionManager and cast the lookup result to javax.transaction.TransactionManager. This seems to be the more generic approach that may work in other containers

inor
  • 2,781
  • 2
  • 32
  • 42