zyxerdima
zyxerdima

Reputation: 27

Spring Integration DAO best practices

Our RESTful WS designed without SI and have following DAO structure:

../dao/FooDao
../dao/BarDao
../dao/UserDao

../daoImpl/..
../service/..

But now we have found necessary to use above component. I am a beginner in systems integration, and after reading "Just Spring Integration" I got basic knowledge about it.

The question is: what are best practices for creating channels, endpoints, etc. FOR DAO? (It would be great if you provide links to articles, books, videos, etc., associated with SI and perhaps useful to me as a beginner.)

Regards

Upvotes: 1

Views: 456

Answers (1)

Artem Bilan
Artem Bilan

Reputation: 121272

The best resource on the matter for beginners is Spring Integration in Action book.

Any you DAO is just a POJO, hence any their methods can be exposed as <service-activator> reference to accept request message (just payload or together with headers) and produce some result which will be present as a reply message.

If you want to expose all those methods as Spring Integration Endpoints you don't have choice, unless provide separate MessageChannel and <service-activator> pair for each of them.

To be honest: Spring Integration isn't positioned as a DAO facade. It plays fully different, integration, role, when you need to ingest/emit the data from/to external systems using Channel Adapters (from big height, of course).

Spring Integration does not aim to be development driven framework, however it is possible. Thanks to MessagingGateway, SpEL and scripting support and that good hook to get deal with the POJO method invocation from many components.

Upvotes: 1

Related Questions