Could anyone help me in deciding the best approach for implementing an application as below:
A request ( xml ) is provided to a handler, which calls specific java class, which inturn get data from backend and prepare the reponse xml and send it back ( xml ). I need to know how I can organise this app into controller, domain and service layers. Siince there is no jsp I believe we won't have a view.
The request xml will be recieved by an MDB and the response xml will be sent back using JMS template.
Spring Framework for setting up your service and repository/dao classes for the business logic that is not related to the UI or transport layer being used.
Then with Spring Web Services you can map an XML file to a Service class method. You can use something like JaxB and map your domain object to the incoming xml and also response outgoing xml. Or Axis or XmlBeans. Then your service is now exposed via Web Services.
With Spring Remoting you can expose you services to RMI, HttpInvoker, or Goucho and I forget the other name.
With Spring MVC you can expose your services to the Web, via Controllers and jsp pages.
The main thing is that the Service layer is identical and doesn't change regardless of where you want them exposed.
My real name is Heartin Jacob Kanikathottu ( visit www.heartin.in for my original profile ) Anyway I have updated my name to Heartin Kanikathottu.
Yes, I will be using Spring Framework for setting up my service and repository/dao classes for the business logic that is not related to the UI or transport layer being used. But I should put only getting data related things in service layer and put business logic in domain layer right?
Also not clear on how other pieces will fit together.
I will make things more clear.
We have a current MQ based ejb application that has an MDB getting the xml request, give the request to a handler and then the handler decides which java class to call based on a parameter. This specific java class will then get data from backend, create response xml and send it back.
My new requirement has to implement the same with below constraints.
1. Need to use message driven beans ( MDB ) for getting data.
2. Need to use spring JDBC template for getting data from backend in form of hash maps.
3. Need to create response xml by populating data from that hash maps.
3. Need to use JMS template for sending data back.
I don't want to use web service here as it is MQ based. So what is the best solution for an MQ based application mentiones above.