Oct 19th, 2010, 04:10 PM
I am currently working on a spring project. In one of the application there is a requirement to have 3 difference input source. For e.g. User can in put through UI, through XML file and through some other module which is not written in Java.
I am planning to write common server side methods(DAOs) and then expose those DAOs as web service so that anyone(any of 3 input ways) can call those common methods to insert,update and delete from database ?
Or does anyone have any better approach to this idea ?
Any suggestion/discussion apprecaited. Thanks.
Nov 8th, 2010, 04:10 PM
Consider Spring Integration
If you have multiple input sources, you may want to consider using Spring Integration for this especially if your input sources could grow (e.g. csv file, jms message). Your UI could interact directly with the service but for xml input and other module inputs, you may want to have some some transformation that occurs and then calls your service in a decoupled way. I would suggest reading up on Spring Integration and see if it fits your use case. I would not create three different services though just because you have 3 different input sources.