1

I would like to deploy MDB on JBOSS. But the publisher will not send messages to the JBOSS AS, it is sending messages to IBM MQ.

Should I use JCA to integrate JBOSS and IBM MQ?

OR

Can the MDB on JBOSS AS subscribe to the topic on which IBM MQ is getting messages from publisher?

What are the advantages of one approach to another?

Noor Syed
  • 630
  • 3
  • 7
  • 16

2 Answers2

1

Yes you can certainly have an MDB in JBoss that is subscribed to a Topic on MQ,

You should deploy the WebSphere MQ Resource Adapter (WMQRA) into JBoss and then configured the WMQ RA JCA resources in JBoss (Activation Specification, Queue/Topic). This will then let you deploy your MDB, and the JCA resources will handle the connection to the WMQ Queue Manager and Queue/Topic that your messages are on.

There are a few guides on setting up the WMQ RA in JBoss around on the internet.

whitfiea
  • 1,943
  • 10
  • 15
  • Can I do it without the Resource Adapter? Like configuring the RemoteJMSProvider inside of $JBOSS_HOME/server/default/deploy/messaging/jms-ds.xml What are the advantages of using one approach over another? – Noor Syed Jul 28 '14 at 22:21
  • You can do, but the generic JMS provider support was there for the days when JMS providers didn't have Resource Adapters. You will want to use the Resource Adapter where you can to get the tight JCA integration. – whitfiea Jul 28 '14 at 22:35
  • Would you be able to give advantages of one approach over another? I would like to understand what happens under the hood when I use a Resource Adapter. – Noor Syed Jul 29 '14 at 16:52
  • I think that is best asked in another SO question rather than a comment to this one. – whitfiea Jul 29 '14 at 17:23
  • Ok, I asked the advantages as a seperate question. So there are two ways only: Generic Resource Adapter And WMQRA (vendor specific resource adapter)? Are there any other ways without using Resource adapters or JCA? – Noor Syed Jul 29 '14 at 20:15
1

The recommended way to consume messages in JBoss from IBM MQ is via a Message Driven Bean (MDB). This is done by deploying the IBM JCA resource adapter (RA) in JBoss. You must use the IBM RA in JBoss as this rar file contains the IBM MQ client code that is needed for communicating with IBM MQ.

When using the MDB approach, the container (JBoss, in this case) works with the JCA to manage JMS connections, message delivery and transactions. This leaves you to only write the onMessage() method - quite a lot gets done for you under the hood.

Doug Grove
  • 962
  • 5
  • 5
  • Welcome to stack overflow! This answer came to me for review as your first post. One thing I noticed that could improve it is if you have any link that shows the OP that this is the recommended way. However, it is a good answer, thanks! – J Richard Snape Feb 12 '15 at 14:46