java:comp/TransactionManager and no need to set an id in tomee.xml IIRC

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2016-02-08 15:20 GMT+01:00 antonypaul <[email protected]>:

> Hi,
>
> How to do JNDI lookup of TransactionManager so that it can be injected to
> Spring. I have declared TransactionManager in tomee.xml
>
> <TransactionManager id="java:comp/env/TransactionManager"
> type="TransactionManager">
>                 defaultTransactionTimeout = 10 minutes
> </TransactionManager>
>
> Tomee 7.0 M1
>
> I am getting this exception
>
> Caused by: javax.naming.NameNotFoundException: Name [TransactionManager] is
> not bound in this Context. Unable to find [TransactionManager].
>         at org.apache.naming.NamingContext.lookup(NamingContext.java:818)
>         at org.apache.naming.NamingContext.lookup(NamingContext.java:166)
>         at
> org.apache.naming.SelectorContext.lookup(SelectorContext.java:157)
>         at javax.naming.InitialContext.lookup(InitialContext.java:411)
>         at
> org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:154)
>         at
> org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87)
>         at
> org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152)
>         at
> org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)
>         at
>
> org.springframework.transaction.jta.JtaTransactionManager.lookupTransactionManager(JtaTransactionManager.java:571)
>
> Regards,
> Antony
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/JNDI-lookup-of-TransactionManager-in-Tomee-tp4677576.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Reply via email to