Although this works like a charm, I get the following warning on the console:
That also happened with datasources when I used the jndi name "jdbc/my-dbcon". I then started using "java:comp/env/jdbc/my-dbcon" and those datasource warnings vanished, but if I use "java:comp/env/jms/my-connection" I receive an error and it stops working. Something like "Error 500: Name comp/env/jdbc not found in context "java:".".
In my web.xml, I have the following data:
If I remove the resource-ref of "jms/my-connection", the JMS still works, as long as I don't prefix the jndi with "java:comp/env/". So it raises another question: do I really need the resource-ref definition there, if it still works without it?
(JMS works without ""java:comp/env/" prefixing, so I assume the JMS is configured properly on Websphere server.)
Any help on successfull JMS referencing using jndi "java:comp/env/" prefix would be great.