Excerpt | ||
---|---|---|
| ||
Service Methods for Backend Calls |
There is normally only one service class per app. The service class'
job is to get data from the back end and perform some biz logic on it
and return it to the front end (actions). There should be one service
interface and one class that implements it, e.g. OasSkeletonService,
and OasSkeletonServiceImpl.
...
For Hibernate apps, the service calls the daos to get biz objects and performs whatever biz logic is necessary on them.
Spring
...
Configuration
The service spring beans are configured in applicationContext.xml (not in action-servlet.xml).
...
If the message objects returned from the back end have both the TYPE
and MESSAGE fields, then setting messageKeys is all the configuration
you need to do (these are automatically dealt with). However, if some
other type of object is returned instead that doesn't have these
fields, you will need to add code in the convertRFCMessage method in
your service implementation to convert these message objects to the
RFCMessage type.