Question

I want to find out if my thoughts are correct about deploying MDP on JBOSS:

There are definitely advantages of using MDP instead of MDB but all these advantages will only work when you don’t use an EJB Container/App Server. Since, I need to use JBOSS 5 APP server, it would be an overkill to have an MDP running under Spring Context which in turn gets deployed on JBOSS App server.

The second reason is Spring framework releases are very quick whereas JBOSS 5 is old, I believe that there will be issues such as conflicting jars.

The third reason is that I haven’t seen many people doing it.

Was it helpful?

Solution

I've been working on several Spring-based projects with more than a dozen message listeners and those projects were deployed, namely, on JBoss (from Jboss 4.x in the early days to the latest JBoss EAP).

There's nothing wrong with deploying a Spring's message listener container within the JBoss infrastructure. In the past, you could hit some inconsistencies though. The most annoying was that the redelivery options defined on the queue were ignored. But that's history as from JBoss5+

To deploy your message listener container on JBoss, you need to configure a regular JndiTemplate and lookup destinations and the ConnectionFactory using it. To be able to resolve destinations by name, you need to specify a JndiDestinationResolver on the container that uses said JndiTemplate. You could also lookup the queue yourself (and get rid of the DestinationResolver)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top