You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Vania <v....@sis-net.it> on 2018/04/18 09:31:08 UTC
Java Mail and JNDI
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
Re: Java Mail and JNDI
Posted by Vania <v....@sis-net.it>.
It worked.
Thank you very much.
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Re: Java Mail and JNDI
Posted by Romain Manni-Bucau <rm...@gmail.com>.
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>
2018-04-18 11:31 GMT+02:00 Vania <v....@sis-net.it>:
> 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
>