‘java:comp/env/jdbc/MY_SQL_DS’ does not work. I get a Naming Exception: NameNotFoundException. neither works ‘MY_SQL_DS’ alone.name exception again.
I created another JNDI for a Mail Session named ‘MY_MailSession’ and reference it like (javax.mail.Session) ctx.lookup( ‘MY_MailSession’ ) which works…
what is the convention to refer the JDBC DataSource then?
I solved it the following way: hope this helps others having the same issue/problem afterwards…