Discussion:
Java Mail and JNDI
Vania
2018-04-18 09:31:08 UTC
Permalink
Hi,

I need to acquire a java mail session resource and I can not use CDI. How
can I acquire it directly using JNDI lookup? I did try the usual lookup
java:comp/env/mail/ + resource id but it didn't work.

Vania



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Romain Manni-Bucau
2018-04-18 09:32:30 UTC
Permalink
Hi Vania,

use openejb:Resource/<resource id> or java:openejb/Resource/<resource id>


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>
Post by Vania
Hi,
I need to acquire a java mail session resource and I can not use CDI. How
can I acquire it directly using JNDI lookup? I did try the usual lookup
java:comp/env/mail/ + resource id but it didn't work.
Vania
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-
f979441.html
Vania
2018-04-18 10:19:46 UTC
Permalink
It worked.

Thank you very much.



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Loading...