Question

I just recently started learning about spring-integration since I need to replace the a MDB(J2EE) application.

The application is composed of mostly MDB which does, splitting, aggregating and scheduling. Which, I think is the perfect criteria to use spring-integration.

I tried out some JMS examples and tried to deploy it but could not figure out how to use the jms-inbound-gateway to replace the MDB.

Is there a way to do this? Or is the only option is still to use MDB and calling the spring-integration service from the MDB's onMessage?

Was it helpful?

Solution

Use a message-driven-channel-adapter instead of an inbound gateway.

With Spring Integration, gateways are for two-way (request/reply) integraton; channel adapters are for one way integration; more like MDBs.

If you need to send some other JMS message downstream, use an outbound channel adapter later in the flow.

It's unusual to keep the MDBs, but you can do it if you really want to, and send a message to an integration flow.

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