Search code examples
jmsjcainbound

JMS for JCA Inbound Messaging?


I am implementing JCA Inbound model so I am studying available reference implementations that I found from Google.

So far I managed to find 2 sample implementations and in both implementation, for inbound messages, they just define a simple MessageListener interface and directly call onMessage method on it.

So I'd like to know if there is any pros/cons to use JMS instead of user defined MessageListener.

Thanks in advance.

Regards,

Kyi Hein


Solution

  • If you plan to open your solution to wider community is good idea to design JCA adapters that requires standard MessageListener interface. Almost every JCA example that people use to learn JCA, relates to MessageListener and what is more important (for me) it is packaged in j2ee libraries. Personaly, I'm sick and horrified when I'm forced to add libraries just because somebody ment that special Listener interface is cool despite the fact it provides developer with same methods as standard MessageListener.