U can't setup a Listener on a RA connection Factory. Use a regular connection factory (not the RA one)
Thanks a lot, that worked, but just out of curiosity, why can't I setup listener on RA connectionfactory? What is the difference? Could you please point me to any tutorial/ref/documentation for more knowledge?
Actually, creating a message listener in a WAR, even if you use the regular JCA factory is an anti-pattern.
This is because you will end up creating and closing a listener *for every request* which will give horrible performance.
The correct way of consuming messages using JEE is to use an MDB.
That was a good explaination Tim, but I really need a message being sent to WAR from EJB, I've made sure that listner is setup & connection is obtained just once & connection remains open until web-app is running.
I'd love explore any other possibility, all I need is EJB to send message to WAR. I found using JMS was nice idea. If you have any suggestion, please share with us all.